Re: [PATCH] hwmon: (emc1403) Add support for EMC1438.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 28, 2024 at 8:15 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > -enum emc1403_chip { emc1402, emc1403, emc1404 };
> > +enum emc1403_chip { emc1402, emc1403, emc1404, emc1408 };
>
> There is no EMC1408, and if there was it might not be compatible with
> EMC1438.

Yes, using the name of a chip that does not (yet) exist is not good. I was going
on the apparent pattern that the name emc140n was used for things common
for all emc14xn chips.

> The 8-channel chips (emc1428 and emc1438) suppport signed data
> and limit registers. This will need to be handled.

I see that my glance at the EMC14xx datasheets was way too brief. EMC1438 looked
like a straight extension of the currently supported chips to 8 channels.
I totally missed the sign bit.

I guess sign_extend32 can be used to handle two's complement for signed chips.
This I guess would mean putting some extra info into thermal_data to let the
show/store functions know whether they are handling a signed chip or not. This
might make the driver unnecessarily messy, as apparently nobody else has been
interested in support for the chips with signed data. If so I withdraw this
patch.

Should this driver be kept unsigned only?

Regards,
Lars Petter





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux