[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E88A1D35AF5437468E5B14C7C4BA61C702D2D2620A@HQMAIL01.nvidia.com>
Date: Tue, 5 Oct 2010 14:36:41 -0700
From: Rhyland Klein <rklein@...dia.com>
To: Joe Perches <joe@...ches.com>
CC: "jic23@....ac.uk" <jic23@....ac.uk>,
Andrew Chew <AChew@...dia.com>,
"olof@...om.net" <olof@...om.net>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
Laxman Dewangan <ldewangan@...dia.com>
Subject: RE: [PATCH v2] iio: light: Adding driver for ISL29018 ALS
> -----Original Message-----
> From: Joe Perches [mailto:joe@...ches.com]
> Sent: Tuesday, October 05, 2010 2:35 PM
> To: Rhyland Klein
> Cc: jic23@....ac.uk; Andrew Chew; olof@...om.net; linux-
> i2c@...r.kernel.org; linux-kernel@...r.kernel.org; linux-
> iio@...r.kernel.org; Laxman Dewangan
> Subject: Re: [PATCH v2] iio: light: Adding driver for ISL29018 ALS
>
> On Tue, 2010-10-05 at 14:19 -0700, rklein@...dia.com wrote:
> > Adding support for the ISL 29018 ambient light and proximity sensor.
>
> Trivial comments below.
>
> > diff --git a/drivers/staging/iio/light/isl29018.c
> b/drivers/staging/iio/light/isl29018.c
> []
> > +static int isl29018_set_range(struct i2c_client *client, unsigned long
> range,
> > + unsigned int *new_range)
> > +{
> > + unsigned long supp_ranges[] = {1000, 4000, 16000, 64000};
>
> static const
Will change.
>
> > +static int isl29018_set_resolution(struct i2c_client *client,
> > + unsigned long adcbit, unsigned int *conf_adc_bit)
> > +{
> > + unsigned long supp_adcbit[] = {16, 12, 8, 4};
>
> here too
This too.
>
> > +static int isl29018_chip_init(struct i2c_client *client)
> > +{
> > + struct isl29018_chip *chip = i2c_get_clientdata(client);
> > + int status;
> > + int i;
> > + int new_adc_bit;
> > + unsigned int new_range;
> > +
> > + for (i = 0; i < ARRAY_SIZE(chip->reg_cache); i++)
> > + chip->reg_cache[i] = 0;
>
> memset?
>
I could use memset, except this is only 4 registers = 32 bytes, so I don't think that is really worth it do you?
Powered by blists - more mailing lists