Re: gpio: rdc321x: Question about rdc_gpio_direction_input implementation

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

 



2014-04-11 12:53 GMT+08:00 Florian Fainelli <florian@xxxxxxxxxxx>:
> Hi Axel,
>
> 2014-04-10 20:28 GMT-07:00 Axel Lin <axel.lin@xxxxxxxxxx>:
>> Hi Florian,
>> Current implementation in rdc_gpio_direction_input() looks wrong to me
>> because calling rdc_gpio_config(chip, gpio, 1) actually set the gpio to
>> OUTPUT HIGH rather than set the direction to INPUT.
>>
>> I cannot find the datasheet, I'm wondering if below diff works.
>> Any chance to test it? I can send a formal patch if it works.
>
> The datasheet is available here:
> http://www.atekmicro.com/download/r8610/R8610-G.pdf
>
> I do not have access to the hardware at this very moment, but I should
> be able to give this a try. I do not think GPIO input was tested at
> all, the GPIO LEDs and such were driven as active outputs.
>
Just check the datasheet and I got confused.

The bits in reg1_ctrl_base/reg2_ctrl_base register is to enable/disable GPIOx
function.
However, I cannot find the register to set gpio direction.

There is a note in 4.4 says
"Note 4: Programmed by the GPIO mode & dir. Register. ".
But I cannot find the GPIO mode & dir. Register.

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux