From: Lars-Peter Clausen <lars@metafoo.de>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org, kernel@savoirfairelinux.com
Subject: Re: max1363: internal reference
Date: Fri, 10 Jan 2014 10:27:43 +0100 [thread overview]
Message-ID: <52CFBD0F.1080603@metafoo.de> (raw)
In-Reply-To: <2013486580.319791.1389289182921.JavaMail.root@mail>
On 01/09/2014 06:39 PM, Vivien Didelot wrote:
> Hi Jonathan,
>
> As described in the max1363.c header, the control of the internal
> reference is not currently supported by the driver.
>
> We have two max11603 and max11605 which need this option. We currently
> use a monkey patch like this in max1363.c:
>
> @@ -1414,7 +1414,12 @@ static const struct max1363_chip_info ma
> static int max1363_initial_setup(struct max1363_state *st)
> {
> +#ifdef OUR_BOARD
> + st->setupbyte = MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_INT
> +#else
> st->setupbyte = MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_VDD
> +#endif
> | MAX1363_SETUP_POWER_UP_INT_REF
> | MAX1363_SETUP_INT_CLOCK
> | MAX1363_SETUP_UNIPOLAR
>
> In order to add the support for this, I would suggest adding a
> platform_data for this driver such as:
>
> struct max1363_platform_data {
> bool internal_reference;
> };
>
> What do you think?
Yes. But make sure to properly document the platform data struct with kernel
doc.
- Lars
next prev parent reply other threads:[~2014-01-10 9:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <235056967.112251.1389282903427.JavaMail.root@mail>
2014-01-09 17:39 ` max1363: internal reference Vivien Didelot
2014-01-10 9:27 ` Lars-Peter Clausen [this message]
2014-01-10 20:00 ` Vivien Didelot
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=52CFBD0F.1080603@metafoo.de \
--to=lars@metafoo.de \
--cc=jic23@kernel.org \
--cc=kernel@savoirfairelinux.com \
--cc=linux-iio@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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.