Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5e9f44c authored by Jean Delvare's avatar Jean Delvare
Browse files

i2c: Drop I2C_CLIENT_INSMOD_2 to 8



These macros simply declare an enum, so drivers might as well declare
it themselves. This puts an end to the arbitrary limit of 8 chip types
per i2c driver.

Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Tested-by: default avatarWolfram Sang <w.sang@pengutronix.de>
parent 1f86df49
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -34,9 +34,8 @@
static const unsigned short normal_i2c[] = {
	0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm,
			mc1066);
enum chips {
	adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066 };

/* adm1021 constants specified below */

+1 −5
Original line number Diff line number Diff line
@@ -64,11 +64,7 @@

static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };

/*
 * Insmod parameters
 */

I2C_CLIENT_INSMOD_2(adm1025, ne1619);
enum chips { adm1025, ne1619 };

/*
 * The ADM1025 registers
+1 −2
Original line number Diff line number Diff line
@@ -64,8 +64,7 @@
/* Addresses to scan */
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_2(adm1030, adm1031);
enum chips { adm1030, adm1031 };

typedef u8 auto_chan_table_t[8][2];

+1 −2
Original line number Diff line number Diff line
@@ -55,8 +55,7 @@
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
					I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_3(adm9240, ds1780, lm81);
enum chips { adm9240, ds1780, lm81 };

/* ADM9240 registers */
#define ADM9240_REG_MAN_ID		0x3e
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@

static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };

I2C_CLIENT_INSMOD_4(adt7473, adt7475, adt7476, adt7490);
enum chips { adt7473, adt7475, adt7476, adt7490 };

static const struct i2c_device_id adt7475_id[] = {
	{ "adt7473", adt7473 },
Loading