[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a44bffff-f465-49a9-ac02-f4d04f59c797@roeck-us.net>
Date: Fri, 15 Nov 2024 06:14:42 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Thomas Richard <thomas.richard@...tlin.com>,
Jean Delvare <jdelvare@...e.com>, Lee Jones <lee@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
thomas.petazzoni@...tlin.com, blake.vermeer@...sight.com
Subject: Re: [PATCH v2 1/2] hwmon: Add Congatec Board Controller monitoring
driver
On 11/15/24 06:00, Thomas Richard wrote:
> On 11/11/24 20:31, Guenter Roeck wrote:
>>
>> I don't understand why this would be needed anyway. The current channel
>> index is well known, so adding or subtracting a constant should do it.
>
> My first idea to use this macro was to avoid issue if a new voltage
> sensor is added in the future.
>
> But it's useless. If in a new generation of Board Controller a voltage
> sensor is added, it will be added at the end of the list.
>
Exactly. And if it isn't added to the end of the list, the array with
the sensor names and types would have to change, meaning a new array
would be needed anyway. If that happens, it would be easier to just
add another constant for that second controller variation.
Thanks,
Guenter
Powered by blists - more mailing lists