Re: [PATCH 0/2] Convert enum->pointer for data in the tmp51x match tables

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

 



On Sun, Aug 20, 2023 at 01:49:08PM +0100, Biju Das wrote:
> Convert enum->pointer for data in the match tables, so that
> device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c
> bus type match support added to it.
> 

I don't see why this would be necessary. You don't explain why the current
implementation would no longer work. Various other drivers implement the
same mechanism as this driver, i.e., type cast the return value of
device_get_match_data() to a non-pointer. I'd argue that changing the
functionality of device_get_match_data() such that this is no longer
possible would be inherently flawed and would introduce unnecessary
complexity to drivers using that mechanism today. If
device_get_match_data() is enhanced to include the functionality of
i2c_match_id(), it should be done in a way that doesn't mandate
such an API change.

> This patch series is only compile tested.

I assume that means you don't have access to the chip. Is this correct ?
Just asking, because it would be great to have a register dump which
would enable me to write unit test code.

Thanks,
Guenter

> 
> Biju Das (2):
>   hwmon: tmp513: Convert enum->pointer for data in the match tables
>   hwmon: tmp513: Add temp_config to struct tmp51x_info
> 
>  drivers/hwmon/tmp513.c | 51 ++++++++++++++++++++++--------------------
>  1 file changed, 27 insertions(+), 24 deletions(-)
> 
> -- 
> 2.25.1
> 



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux