From: Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: "Lothar Waßmann" <LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
Cc: "Shawn Guo" <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Samuel Ortiz" <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
"Dmitry Torokhov"
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Jonathan Cameron"
<jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Fabio Estevam"
<festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Peter Meerwald" <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
"Hartmut Knaack" <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Lars-Peter Clausen"
<lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
"Eric Bénard" <eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
"Pawel Moll" <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
"Ian Campbell"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Kumar Gala" <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"Denis Carikli" <denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org>,
"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Sascha Hauer" <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Lee Jones" <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v6 4/8] mfd: fsl imx25 Touchscreen ADC driver
Date: Fri, 30 Jan 2015 08:20:16 +0100 [thread overview]
Message-ID: <20150130072016.GA16879@pengutronix.de> (raw)
In-Reply-To: <20150130074324.3e4d868f-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3443 bytes --]
Hi,
On Fri, Jan 30, 2015 at 07:43:24AM +0100, Lothar Waßmann wrote:
> Hi,
>
> Markus Pargmann wrote:
> > This is the core driver for imx25 touchscreen/adc driver. The module
> > has one shared ADC and two different conversion queues which use the
> > ADC. The two queues are identical. Both can be used for general purpose
> > ADC but one is meant to be used for touchscreens.
> >
> > This driver is the core which manages the central components and
> > registers of the TSC/ADC unit. It manages the IRQs and forwards them to
> > the correct components.
> >
> [...]
> > diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c
> > new file mode 100644
> > index 000000000000..8e4013d57500
> > --- /dev/null
> > +++ b/drivers/mfd/fsl-imx25-tsadc.c
> > @@ -0,0 +1,167 @@
> [...]
> > +#define MX25_TGCR_POWERMODE_MASK (3 << 8)
> > +#define MX25_TGCR_POWERMODE_SAVE BIT(8)
> > +#define MX25_TGCR_POWERMODE_ON (2 << 8)
> >
> This looks a bit weird and conceals the fact, that
> MX25_TGCR_POWERMODE_SAVE is in fact one of the possible settings
> of a two bit bitfield. For consistency I would write:
> #define MX25_TGCR_POWERMODE_MASK (3 << 8)
> #define MX25_TGCR_POWERMODE_SAVE (1 << 8)
> #define MX25_TGCR_POWERMODE_ON (2 << 8)
>
> [...]
> > +#define MX25_ADCQ_CFG_YPLL_HIGH 0
> > +#define MX25_ADCQ_CFG_YPLL_OFF BIT(12)
> > +#define MX25_ADCQ_CFG_YPLL_LOW (3 << 12)
> >
> dto.
>
> > +#define MX25_ADCQ_CFG_XNUR_HIGH 0
> > +#define MX25_ADCQ_CFG_XNUR_OFF BIT(10)
> > +#define MX25_ADCQ_CFG_XNUR_LOW (3 << 10)
> >
> dto.
>
> > +#define MX25_ADCQ_CFG_XPUL_OFF BIT(9)
> > +#define MX25_ADCQ_CFG_XPUL_HIGH 0
> >
> |#define MX25_ADCQ_CFG_XPUL_OFF (1 << 9)
> |#define MX25_ADCQ_CFG_XPUL_HIGH (0 << 9)
> would make it more clear, that these refer to the two states of the same
> bit.
>
> > +#define MX25_ADCQ_CFG_REFP(sel) (sel << 7)
> >
> missing () around macro argument
>
> > +#define MX25_ADCQ_CFG_REFP_YP 0
> > +#define MX25_ADCQ_CFG_REFP_XP (1 << 7)
> > +#define MX25_ADCQ_CFG_REFP_EXT (2 << 7)
> > +#define MX25_ADCQ_CFG_REFP_INT (3 << 7)
> > +#define MX25_ADCQ_CFG_REFP_MASK (3 << 7)
> >
> see my previous comment.
>
> > +#define MX25_ADCQ_CFG_IN(sel) (sel << 4)
> >
> missing () around macro argument
>
> > +#define MX25_ADCQ_CFG_IN_XP 0
> > +#define MX25_ADCQ_CFG_IN_YP (1 << 4)
> > +#define MX25_ADCQ_CFG_IN_XN (2 << 4)
> > +#define MX25_ADCQ_CFG_IN_YN (3 << 4)
> >
> see my previous comment.
>
> > +#define MX25_ADCQ_CFG_IN_WIPER (4 << 4)
> > +#define MX25_ADCQ_CFG_IN_AUX0 (5 << 4)
> > +#define MX25_ADCQ_CFG_IN_AUX1 (6 << 4)
> > +#define MX25_ADCQ_CFG_IN_AUX2 (7 << 4)
> > +#define MX25_ADCQ_CFG_REFN(sel) (sel << 2)
> >
> missing () around macro argument
>
> > +#define MX25_ADCQ_CFG_REFN_XN 0
> > +#define MX25_ADCQ_CFG_REFN_YN (1 << 2)
> > +#define MX25_ADCQ_CFG_REFN_NGND (2 << 2)
> > +#define MX25_ADCQ_CFG_REFN_NGND2 (3 << 2)
> > +#define MX25_ADCQ_CFG_REFN_MASK (3 << 2)
> >
> see my previous comment.
Thanks, I fixed all of the comments.
Best regards,
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-01-30 7:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 14:09 [PATCH v6 0/8] imx25 adc and touchscreen driver Markus Pargmann
2015-01-29 14:09 ` [PATCH v6 1/8] ARM: dt: Binding documentation for imx25 ADC/TSC Markus Pargmann
2015-01-29 14:09 ` [PATCH v6 3/8] ARM: dt: Binding documentation for imx25 touchscreen controller Markus Pargmann
[not found] ` <1422540556-14828-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-29 14:09 ` [PATCH v6 2/8] ARM: dt: Binding documentation for imx25 GCQ Markus Pargmann
2015-02-04 16:48 ` Jonathan Cameron
2015-01-29 14:09 ` [PATCH v6 4/8] mfd: fsl imx25 Touchscreen ADC driver Markus Pargmann
2015-01-30 6:43 ` Lothar Waßmann
[not found] ` <20150130074324.3e4d868f-VjFSrY7JcPWvSplVBqRQBQ@public.gmane.org>
2015-01-30 7:20 ` Markus Pargmann [this message]
2015-01-29 14:09 ` [PATCH v6 5/8] iio: adc: fsl,imx25-gcq driver Markus Pargmann
2015-01-29 14:30 ` Varka Bhadram
[not found] ` <54CA4419.1060207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-30 8:16 ` Markus Pargmann
2015-02-04 16:42 ` Jonathan Cameron
2015-02-04 16:48 ` Jonathan Cameron
2015-02-26 15:23 ` Markus Pargmann
2015-01-29 14:09 ` [PATCH v6 6/8] input: touchscreen: imx25 tcq driver Markus Pargmann
[not found] ` <1422540556-14828-7-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-29 14:26 ` Varka Bhadram
2015-01-30 18:57 ` Dmitry Torokhov
2015-02-02 16:05 ` Markus Pargmann
[not found] ` <20150202160539.GS16879-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-02-02 17:51 ` Dmitry Torokhov
2015-02-26 14:30 ` Markus Pargmann
2015-01-29 14:09 ` [PATCH v6 7/8] ARM: dts: imx25: Add TSC and ADC support Markus Pargmann
2015-01-29 14:09 ` [PATCH v6 8/8] ARM: imx_v4_v5_defconfig: Add I.MX25 Touchscreen controller " Markus Pargmann
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=20150130072016.GA16879@pengutronix.de \
--to=mpa-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org \
--cc=denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=eric-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).