Linux-Hwmon Archive on lore.kernel.org
 help / Atom feed
* Re: [PATCH] f71882fg: add support f81804 & f81966
@ 2019-01-17 23:45 Guenter Roeck
  0 siblings, 0 replies; 1+ messages in thread
From: Guenter Roeck @ 2019-01-17 23:45 UTC (permalink / raw)
  To: Steffen Kothe; +Cc: linux-hwmon, Jean Delvare

On Tue, Jan 15, 2019 at 11:27:22AM +0100, Steffen Kothe wrote:

Please do not send patches as attachment.

> Support for Fintek F81804 & F81966.
> Enumerate chip and use Fintek F81866 as template,
> because implementation is the same.
> 

Can someone confirm that this correct ? I don't have access to any Fintek
datasheets.

> Signed-off-by: Steffen Kothe <steffen.kothe.gc1993@googlemail.com>
> ---
>  drivers/hwmon/f71882fg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
> index ca54ce5c8e10..8a2bc1ecf991 100644
> --- a/drivers/hwmon/f71882fg.c
> +++ b/drivers/hwmon/f71882fg.c
> @@ -62,6 +62,7 @@
>  #define SIO_F81768D_ID		0x1210	/* Chipset ID */
>  #define SIO_F81865_ID		0x0704	/* Chipset ID */
>  #define SIO_F81866_ID		0x1010	/* Chipset ID */
> +#define SIO_F81804_ID		0x1502	/* Chipset ID, same for Fintek F81966 */
>  
>  #define REGION_LENGTH		8
>  #define ADDR_REG_OFFSET		5
> @@ -2685,7 +2686,8 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data)
>  		sio_data->type = f81865f;
>  		break;
>  	case SIO_F81866_ID:
> -		sio_data->type = f81866a;
> +	case SIO_F81804_ID:
> +		sio_data->type = f81866a;	/*correlates to Fintek f81866a*/

The downside of this solution is that the kernel will report that it
found a f81866a. Introducing a new ID seems excessive if the chips
are truly compatible, but I am open to a better solution.

At the very least, I think it would be appropriate to change the log
message to something like "Found XXXX or compatible chip at ...".

Thanks,
Guenter

>  		break;
>  	default:
>  		pr_info("Unsupported Fintek device: %04x\n",
> -- 
> 2.17.1

^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 23:45 [PATCH] f71882fg: add support f81804 & f81966 Guenter Roeck

Linux-Hwmon Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hwmon/0 linux-hwmon/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hwmon linux-hwmon/ https://lore.kernel.org/linux-hwmon \
		linux-hwmon@vger.kernel.org linux-hwmon@archiver.kernel.org
	public-inbox-index linux-hwmon


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hwmon


AGPL code for this site: git clone https://public-inbox.org/ public-inbox