All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: "Martin Liška" <marxin.liska@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
	platform-driver-x86@vger.kernel.org, linux-iio@vger.kernel.org,
	Zhang Rui <rui.zhang@intel.com>,
	Corentin Chary <corentin.chary@gmail.com>, joeyli <jlee@suse.com>,
	Len Brown <len.brown@intel.com>,
	pavel@denx.de, Jonathan Cameron <jic23@kernel.org>,
	Jon Brenner <jbrenner@taosinc.com>,
	Peter Meerwald <pmeerw@pmeerw.net>
Subject: Re: ACPI ambient light sensor
Date: Tue, 11 Sep 2012 11:21:33 +0200	[thread overview]
Message-ID: <201209111121.34205.marex@denx.de> (raw)
In-Reply-To: <CAObPJ3ORe_MGbmEHzZ4SGqZkn3HCQs+ocSw=Ttb7LbCTNCDkAQ@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
To: "Martin Liška" <marxin.liska-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jonathan Cameron <jic23-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>,
	platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Zhang Rui <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Corentin Chary
	<corentin.chary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	joeyli <jlee-IBi9RG/b67k@public.gmane.org>,
	Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	pavel-ynQEQJNshbs@public.gmane.org,
	Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Jon Brenner <jbrenner-yYKgigLBUwlBDgjK7y7TUQ@public.gmane.org>,
	Peter Meerwald <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>
Subject: Re: ACPI ambient light sensor
Date: Tue, 11 Sep 2012 11:21:33 +0200	[thread overview]
Message-ID: <201209111121.34205.marex@denx.de> (raw)
In-Reply-To: <CAObPJ3ORe_MGbmEHzZ4SGqZkn3HCQs+ocSw=Ttb7LbCTNCDkAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Dear Martin Liška,

[...]

> +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 = NULL below (aka. don't put it into the structure at all).

> +static const struct iio_chan_spec acpi_als_channels[] = {
> + {
> + .type = IIO_LIGHT,
> + .indexed = 1,
> + .channel = 1,
> + .scan_type.sign = 'u',
> + .scan_type.realbits = 10,
> + .scan_type.storagebits = 16,
> + .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT |
> + IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
> + },
> +};
> +
> +static const struct iio_info acpi_als_info = {
> + .driver_module = THIS_MODULE,
> + .read_raw = &acpi_als_read_raw,
> + .write_raw = &acpi_als_write_raw,
> +};
[...]
Best regards,
Marek Vasut

  parent reply	other threads:[~2012-09-11  9:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-08 20:03 ACPI ambient light sensor Martin Liška
2012-07-08 20:28 ` Marek Vasut
2012-07-08 20:28   ` Marek Vasut
2012-07-09 13:29   ` Jonathan Cameron
2012-07-09 13:29     ` Jonathan Cameron
2012-09-11  7:48     ` Martin Liška
2012-09-11  8:27       ` Marek Vasut
2012-09-11  8:27         ` Marek Vasut
2012-09-11  8:35       ` Peter Meerwald
2012-09-11  9:21       ` Marek Vasut [this message]
2012-09-11  9:21         ` Marek Vasut
2012-10-21 17:02         ` Martin Liška
2012-10-21 17:32           ` Marek Vasut
2012-10-21 17:32             ` Marek Vasut
2012-10-21 18:05           ` Jonathan Cameron
2012-10-21 18:05             ` Jonathan Cameron
2012-10-27 16:39             ` Martin Liška
2012-10-27 17:08               ` Jonathan Cameron
2012-10-27 18:00                 ` Corentin Chary
2012-10-27 18:00                   ` Corentin Chary
2012-11-29  2:46                   ` ACPI ALS patch marxin.liska
2012-11-29  2:46                     ` [PATCH] ACPI ALS driver for iio introduced marxin.liska
2012-11-29  8:02                       ` Corentin Chary
2012-11-29 10:18                         ` Lars-Peter Clausen
2012-11-29 10:18                           ` Lars-Peter Clausen
     [not found]                         ` <CAObPJ3NM7mn+pXJ801hC2Dn7t9kqp4X_FuD8TSmJ6-eH7UP8pA@mail.gmail.com>
2012-12-02 11:20                           ` Corentin Chary
2012-11-29 10:15                       ` Lars-Peter Clausen
2012-11-29 10:15                         ` Lars-Peter Clausen
2012-12-01 16:46                         ` Martin Liška
2012-12-01 16:46                           ` Martin Liška
2012-12-02 13:24                           ` Jonathan Cameron
2012-12-02 13:24                             ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201209111121.34205.marex@denx.de \
    --to=marex@denx.de \
    --cc=corentin.chary@gmail.com \
    --cc=jbrenner@taosinc.com \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=jlee@suse.com \
    --cc=len.brown@intel.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=marxin.liska@gmail.com \
    --cc=pavel@denx.de \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.