* [PATCH v2] hwmon: emc1403: Add support for EMC1442
@ 2023-11-02 9:08 Delphine CC Chiu
2023-11-02 13:26 ` Patrick Williams
2023-11-02 14:33 ` Guenter Roeck
0 siblings, 2 replies; 4+ messages in thread
From: Delphine CC Chiu @ 2023-11-02 9:08 UTC (permalink / raw)
To: patrick
Cc: Delphine CC Chiu, Jean Delvare, Guenter Roeck, linux-hwmon, linux-kernel
Add support for EMC1442 which is compatible with EMC1403.
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
change in v2:
Revised emc1403 to emc1402
---
drivers/hwmon/emc1403.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
index bb7c859e799d..1332e4ac078c 100644
--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -346,6 +346,9 @@ static int emc1403_detect(struct i2c_client *client,
case 0x27:
strscpy(info->type, "emc1424", I2C_NAME_SIZE);
break;
+ case 0x60:
+ strscpy(info->type, "emc1442", I2C_NAME_SIZE);
+ break;
default:
return -ENODEV;
}
@@ -430,7 +433,7 @@ static int emc1403_probe(struct i2c_client *client)
}
static const unsigned short emc1403_address_list[] = {
- 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
+ 0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
};
/* Last digit of chip name indicates number of channels */
@@ -444,6 +447,7 @@ static const struct i2c_device_id emc1403_idtable[] = {
{ "emc1422", emc1402 },
{ "emc1423", emc1403 },
{ "emc1424", emc1404 },
+ { "emc1442", emc1402 },
{ }
};
MODULE_DEVICE_TABLE(i2c, emc1403_idtable);
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] hwmon: emc1403: Add support for EMC1442
2023-11-02 9:08 [PATCH v2] hwmon: emc1403: Add support for EMC1442 Delphine CC Chiu
@ 2023-11-02 13:26 ` Patrick Williams
2023-11-02 14:34 ` Guenter Roeck
2023-11-02 14:33 ` Guenter Roeck
1 sibling, 1 reply; 4+ messages in thread
From: Patrick Williams @ 2023-11-02 13:26 UTC (permalink / raw)
To: Delphine CC Chiu; +Cc: Jean Delvare, Guenter Roeck, linux-hwmon, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
On Thu, Nov 02, 2023 at 05:08:07PM +0800, Delphine CC Chiu wrote:
I have a datasheet for this chip with a "Revision 1.0 (10-25-10)" in the
footer. Reviewed the change against the datasheet.
> Add support for EMC1442 which is compatible with EMC1403.
>
> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> ---
> change in v2:
> Revised emc1403 to emc1402
> + case 0x60:
> + strscpy(info->type, "emc1442", I2C_NAME_SIZE);
> + break;
Confirmed against datasheet.
Section 2.2 "Register Set Delta" specifies:
- Product ID | 60h
> static const unsigned short emc1403_address_list[] = {
> - 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
> + 0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
Confirmed against datasheet.
Section 5.1.2 "SMBus Address and RD/WR Bit" has a table indicating that
a 22k pull-up resistor corresponds to `0011_100?` binary.
> { "emc1422", emc1402 },
> { "emc1423", emc1403 },
> { "emc1424", emc1404 },
> + { "emc1442", emc1402 },
Datasheet section 2.1 is titled "Functional Delta from EMC1412 to
EMC1442", with minimal differences. We map "emc1412" to `emc1402`, so
mapping "emc1442" to the same should be appropriate.
Reviewed-by: Patrick Williams <patrick@stwcx.xyz>
--
Patrick Williams
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] hwmon: emc1403: Add support for EMC1442
2023-11-02 9:08 [PATCH v2] hwmon: emc1403: Add support for EMC1442 Delphine CC Chiu
2023-11-02 13:26 ` Patrick Williams
@ 2023-11-02 14:33 ` Guenter Roeck
1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2023-11-02 14:33 UTC (permalink / raw)
To: Delphine CC Chiu, patrick; +Cc: Jean Delvare, linux-hwmon, linux-kernel
On 11/2/23 02:08, Delphine CC Chiu wrote:
> Add support for EMC1442 which is compatible with EMC1403.
^^^^^^^
EMC1402
NP, I can fix that up when applying.
>
> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> ---
> change in v2:
> Revised emc1403 to emc1402
> ---
> drivers/hwmon/emc1403.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
> index bb7c859e799d..1332e4ac078c 100644
> --- a/drivers/hwmon/emc1403.c
> +++ b/drivers/hwmon/emc1403.c
> @@ -346,6 +346,9 @@ static int emc1403_detect(struct i2c_client *client,
> case 0x27:
> strscpy(info->type, "emc1424", I2C_NAME_SIZE);
> break;
> + case 0x60:
> + strscpy(info->type, "emc1442", I2C_NAME_SIZE);
> + break;
> default:
> return -ENODEV;
> }
> @@ -430,7 +433,7 @@ static int emc1403_probe(struct i2c_client *client)
> }
>
> static const unsigned short emc1403_address_list[] = {
> - 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
> + 0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
^^^^
This also needs confirmation from someone (else) with a datasheet.
Thanks,
Guenter
> };
>
> /* Last digit of chip name indicates number of channels */
> @@ -444,6 +447,7 @@ static const struct i2c_device_id emc1403_idtable[] = {
> { "emc1422", emc1402 },
> { "emc1423", emc1403 },
> { "emc1424", emc1404 },
> + { "emc1442", emc1402 },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, emc1403_idtable);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] hwmon: emc1403: Add support for EMC1442
2023-11-02 13:26 ` Patrick Williams
@ 2023-11-02 14:34 ` Guenter Roeck
0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2023-11-02 14:34 UTC (permalink / raw)
To: Patrick Williams, Delphine CC Chiu
Cc: Jean Delvare, linux-hwmon, linux-kernel
On 11/2/23 06:26, Patrick Williams wrote:
> On Thu, Nov 02, 2023 at 05:08:07PM +0800, Delphine CC Chiu wrote:
>
> I have a datasheet for this chip with a "Revision 1.0 (10-25-10)" in the
> footer. Reviewed the change against the datasheet.
>
>> Add support for EMC1442 which is compatible with EMC1403.
>>
>> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
>> ---
>> change in v2:
>> Revised emc1403 to emc1402
>
>> + case 0x60:
>> + strscpy(info->type, "emc1442", I2C_NAME_SIZE);
>> + break;
>
> Confirmed against datasheet.
>
> Section 2.2 "Register Set Delta" specifies:
> - Product ID | 60h
>
>> static const unsigned short emc1403_address_list[] = {
>> - 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
>> + 0x18, 0x1c, 0x29, 0x3c, 0x4c, 0x4d, 0x5c, I2C_CLIENT_END
>
> Confirmed against datasheet.
>
> Section 5.1.2 "SMBus Address and RD/WR Bit" has a table indicating that
> a 22k pull-up resistor corresponds to `0011_100?` binary.
>
>> { "emc1422", emc1402 },
>> { "emc1423", emc1403 },
>> { "emc1424", emc1404 },
>> + { "emc1442", emc1402 },
>
> Datasheet section 2.1 is titled "Functional Delta from EMC1412 to
> EMC1442", with minimal differences. We map "emc1412" to `emc1402`, so
> mapping "emc1442" to the same should be appropriate.
>
>
> Reviewed-by: Patrick Williams <patrick@stwcx.xyz>
>
Thanks. I'll apply, and fix the description while doing so.
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-02 14:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02 9:08 [PATCH v2] hwmon: emc1403: Add support for EMC1442 Delphine CC Chiu
2023-11-02 13:26 ` Patrick Williams
2023-11-02 14:34 ` Guenter Roeck
2023-11-02 14:33 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®