lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 1 Apr 2015 10:18:53 +0200
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Beomho Seo <beomho.seo@...sung.com>
Cc:	lee.jones@...aro.org, galak@...eaurora.org,
	linux-kernel@...r.kernel.org, cw00.choi@...sung.com,
	sangbae90.lee@...sung.com, inki.dae@...sung.com,
	Kozik <k.kozlowski@...sung.com>, linux-pm@...r.kernel.org,
	myungjoo.ham@...sung.com, Sebastian Reichel <sre@...nel.org>,
	jonghwa3.lee@...sung.com
Subject: Re: [PATCH 1/3] power: max17042_battery: Use reg type instead of chip type

2015-03-31 15:29 GMT+02:00 Beomho Seo <beomho.seo@...sung.com>:
> Currently, max17042 battery driver choose register map by MAX17042_DevName
> register. But thid register is return IC specific firmware version. So other
> maxim chip hard to use this drvier. This patch choose reg_type by driver_data.

I don't quite get the concept of "reg_type" and why it replaces chip
type? It seems that you choose reg_type based on given chip type so
there is direct mapping chip_type->reg_type. If max17047 and max17050
are the same from the point of view of interface (registers) then they
should use the same compatible or the same device type. Something
like:

>  static const struct i2c_device_id max17042_id[] = {
> -       { "max17042", 0 },
> -       { "max17047", 1 },
> -       { "max17050", 2 },
> +       { "max17042", MAXIM_DEVICE_TYPE_MAX17042 },
> +       { "max17047", MAXIM_DEVICE_TYPE_MAX17047 },
> +       { "max17050", MAXIM_DEVICE_TYPE_MAX17047 }, /* Same as 17047 */
>         { }

So why you are adding the conversion from i2c_device_id -> reg_type?

Beside that, thanks for integrating this into existing driver! Much appreciated.

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ