lkml.org 
[lkml]   [2014]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/4] pinctrl: qpnp: Qualcomm PMIC pin controller driver
From
Date
On Mon, 2014-08-04 at 18:36 -0700, Stephen Boyd wrote:
> On 07/28/14 01:39, Ivan T. Ivanov wrote:
> > I am working on proposal from Stephen Boyd to encode GPIO/MPP mode and
> > source select into combined function. Something like this one:
> >
> > #define PM8XXX_DIGITAL_IN 0
> > #define PM8XXX_DIGITAL_OUT 1
> > #define PM8XXX_DIGITAL_IN_OUT 2
> >
> > ...
> >
> > /* mode and source select */
> > #define PM8XXX_FUNCTION(m,s) ((m) << 16 | (s))
> >
> > #define PM8921_GPIO1_14_KYPD_SNS PM8XXX_FUNCTION(PM8XXX_DIGITAL_IN, 1)
> > #define PM8921_GPIO9_14_KYPD_DRV PM8XXX_FUNCTION(PM8XXX_DIGITAL_OUT, 1)
> > #define PM8921_GPIO33_35_PWM PM8XXX_FUNCTION(PM8XXX_DIGITAL_OUT, 3)
> >
> > ..
> >
> >
>
> This isn't what I was suggesting at all. The function should be
> something like KYPD, PWM and those should just be defined to be 1 or 3.
> The mode should be some other property like input or output, and the
> driver should or the two together and put it into the register.

Well, we can do this. I was just thought that will more convenient if
function is fully described in to one property.

Regards,
Ivan




\
 
 \ /
  Last update: 2014-08-05 14:21    [W:0.068 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site