Re: [PATCH 4/5] ppc: DA923RC: add board support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/10/2013 16:01, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 14:41 Thu 31 Oct     , Renaud Barbier wrote:
>> On 30/10/2013 11:34, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>>> +		barebox_set_model("Unknown");
>>>>> +
>>>>> +	/* Enable the GPIO Out pins */
>>>>> +	out_be32(gur + MPC85xx_GPIOCR_OFFSET, (gpiocr | MPC85xx_GPIOCR_GPOUT));
>>> this should be GPIO API
>>>>> +
>>>>> +	/* Enable NOR low voltage programming (gpio 2) an
>>
>> Note that here the code enables a CPU function that is, the whole block
>> of pins is enabled to be used as GPIO out pin. This does not specify the
>> pins direction but the pins function.
>> Of course, this can be wrap in a function specific to the CPU.
>>
> 
> so this should use pinctrl API
> 
> Best Regards,
> J.
>>

The pinctrl support seems oriented at enumerating and naming pins as
well as controlling pin properties (direction, drive  strength,...) on
an individual basis.

In the code above, it is simply enabling the GPIO out function of the CPU.

For controlling individual GPIO pins, you suggestion of using the GPIO
API seems the right one to do what I need to do.

Thanks.

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux