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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 18 Feb 2014 21:35:30 +0100
From:	Belisko Marek <marek.belisko@...il.com>
To:	Jonathan Cameron <jic23@...nel.org>
Cc:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Rob Landley <rob@...dley.net>,
	Peter Meerwald <pmeerw@...erw.net>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, linux-iio@...r.kernel.org,
	devel@...verdev.osuosl.org,
	"Dr. H. Nikolaus Schaller" <hns@...delico.com>
Subject: Re: [PATCH 1/2] staging: iio: hmc5843: Add all available models to
 device tree id table.

Hi Jonathan,

On Tue, Feb 18, 2014 at 11:40 AM, Jonathan Cameron <jic23@...nel.org> wrote:
> On 14/02/14 14:25, Marek Belisko wrote:
>>
>> Signed-off-by: Marek Belisko <marek@...delico.com>
>
> I wonder how this got missed.  However, for those data elements to be
> useful, you will
> need to read them somewhere in the driver I think.... (if there is any magic
> that puts this in the relevant i2c locations then point it out to me!)
There is a table called hmc5843_chip_info_tbl which contains entries
for all models
which this driver can handle. And magic is that correct model variant
is set probe function:
line: idata->variant = &hmc5843_chip_info_tbl[id->driver_data];
(id->driver_data contains model value).
>
>> ---
>>   drivers/staging/iio/magnetometer/hmc5843.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/iio/magnetometer/hmc5843.c
>> b/drivers/staging/iio/magnetometer/hmc5843.c
>> index d4f4dd9..f595fdc 100644
>> --- a/drivers/staging/iio/magnetometer/hmc5843.c
>> +++ b/drivers/staging/iio/magnetometer/hmc5843.c
>> @@ -630,7 +630,9 @@ static const struct i2c_device_id hmc5843_id[] = {
>>   MODULE_DEVICE_TABLE(i2c, hmc5843_id);
>>
>>   static const struct of_device_id hmc5843_of_match[] = {
>> -       { .compatible = "honeywell,hmc5843" },
>> +       { .compatible = "honeywell,hmc5843", .data = (void *)HMC5843_ID },
>> +       { .compatible = "honeywell,hmc5883", .data = (void *)HMC5883_ID },
>> +       { .compatible = "honeywell,hmc5883l", .data = (void *)HMC5883L_ID
>> },
>>         {}
>>   };
>>   MODULE_DEVICE_TABLE(of, hmc5843_of_match);
>>
>

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
--
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