From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Vasut To: Martin =?utf-8?q?Li=C5=A1ka?= Subject: Re: ACPI ambient light sensor Date: Tue, 11 Sep 2012 11:21:33 +0200 Cc: Jonathan Cameron , platform-driver-x86@vger.kernel.org, linux-iio@vger.kernel.org, Zhang Rui , Corentin Chary , joeyli , Len Brown , pavel@denx.de, Jonathan Cameron , Jon Brenner , Peter Meerwald References: <4FFADCC2.6080006@cam.ac.uk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Message-Id: <201209111121.34205.marex@denx.de> List-ID: Dear Martin Li=C5=A1ka, [...] > +static int acpi_als_write_raw(struct iio_dev *indio_dev, > + struct iio_chan_spec const *chan, int val, int val2, long mask) > +{ > + return 0; > +} Simply set write_raw =3D NULL below (aka. don't put it into the structure a= t all). > +static const struct iio_chan_spec acpi_als_channels[] =3D { > + { > + .type =3D IIO_LIGHT, > + .indexed =3D 1, > + .channel =3D 1, > + .scan_type.sign =3D 'u', > + .scan_type.realbits =3D 10, > + .scan_type.storagebits =3D 16, > + .info_mask =3D IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | > + IIO_CHAN_INFO_SCALE_SEPARATE_BIT, > + }, > +}; > + > +static const struct iio_info acpi_als_info =3D { > + .driver_module =3D THIS_MODULE, > + .read_raw =3D &acpi_als_read_raw, > + .write_raw =3D &acpi_als_write_raw, > +}; [...] Best regards, Marek Vasut From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Subject: Re: ACPI ambient light sensor Date: Tue, 11 Sep 2012 11:21:33 +0200 Message-ID: <201209111121.34205.marex@denx.de> References: <4FFADCC2.6080006@cam.ac.uk> Mime-Version: 1.0 Content-Type: Text/Plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Martin =?utf-8?q?Li=C5=A1ka?= Cc: Jonathan Cameron , platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Zhang Rui , Corentin Chary , joeyli , Len Brown , pavel-ynQEQJNshbs@public.gmane.org, Jonathan Cameron , Jon Brenner , Peter Meerwald List-Id: platform-driver-x86.vger.kernel.org Dear Martin Li=C5=A1ka, [...] > +static int acpi_als_write_raw(struct iio_dev *indio_dev, > + struct iio_chan_spec const *chan, int val, int val2, long mask) > +{ > + return 0; > +} Simply set write_raw =3D NULL below (aka. don't put it into the structu= re at all). > +static const struct iio_chan_spec acpi_als_channels[] =3D { > + { > + .type =3D IIO_LIGHT, > + .indexed =3D 1, > + .channel =3D 1, > + .scan_type.sign =3D 'u', > + .scan_type.realbits =3D 10, > + .scan_type.storagebits =3D 16, > + .info_mask =3D IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | > + IIO_CHAN_INFO_SCALE_SEPARATE_BIT, > + }, > +}; > + > +static const struct iio_info acpi_als_info =3D { > + .driver_module =3D THIS_MODULE, > + .read_raw =3D &acpi_als_read_raw, > + .write_raw =3D &acpi_als_write_raw, > +}; [...] Best regards, Marek Vasut