Question: what is the best way to use gpio-syscon driver

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

 



Hi all,

   I'd like to use a special pin to control the voltage io of the SD card.
This pin is set by bit 1 of GRF_SOC_CON10 register in Rockchip RK3328),
which is not a simple gpio.

I have found out the gpio-syscon, which should fit my need. But after reading
the source code, it seems that I have to add a ton of stuff to control
this little bit.

This is my regulator:

vcc_sdio: sdmmcio-regulator {
  compatible = "regulator-gpio";
  gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
  states = <1800000 0x1
                 3300000 0x0>;
  regulator-name = "vcc_sdio";
  regulator-type = "voltage";
  regulator-min-microvolt = <1800000>;
  regulator-max-microvolt = <3300000>;
};

<&gpio0 25> is a special gpio which will not be accessed by the pinctrl.

I need to relace it with:

  gpios = <&special_gpio 0 GPIO_ACTIVE_HIGH>;

and defines it as:
  special_gpio: special-gpio {
      compatible = "gpio-syscon";
      gpio-controller;
      #gpio-cells = <2>;
  }

The question is, there's no "gpio-syscon" driver id in gpio-syscon.
I'll have to modify that driver to add another "rockchip,rk3328-special-gpio"
and related configuration.

Is there any common solution to this practice? Please shed some light on this.
Thanks in advance.

-- 
Thanks and Regards,
Levin
--
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