regulator-max-microvolt = <1200000>;
gpio = <&pcal6408ahk_d 2 1>;
enable-active-high;
- regulator-always-on;
+
};
reg_usb_hub_vcc5v: regulator-hub-vcc5v-en {
regulator-max-microvolt = <5000000>;
gpio = <&pcal6408ahk_d 3 1>;
enable-active-high;
- regulator-always-on;
+
};
wcn_wifi: wireless-wlan {
gpio-keys {
compatible = "gpio-keys";
- pinctrl-0 = <&pinctrl_volume>;
+ pinctrl-0 = <&pinctrl_volume &pinctrl_sleep>;
pinctrl-names = "default";
key-volumedown {
label = "Volume Down Key";
debounce-interval = <1>;
gpios = <&gpio2_porta 25 0x1>;
};
+ key-sleep {
+ label = "Sleep Wake Key";
+ wakeup-source;
+ linux,code = <KEY_SLEEP>;
+ debounce-interval = <1>;
+ gpios = <&ao_gpio_porta 2 0x1>;
+ };
};
aon: aon {
regulator-max-microvolt = <3300000>;
gpio = <&gpio1_porta 22 1>;
enable-active-high;
- regulator-always-on;
+
};
pinctrl_audiopa30: audiopa30 {
thead,pins = < FM_AUDIO_PA30 LIGHT_PIN_FUNC_0 0x000 >;
};
+ pinctrl_sleep: sleep_grp {
+ thead,pins = <
+ FM_CPU_JTG_TCLK 0x3 0x238
+ >;
+ };
};
};
static int dwc3_thead_pm_suspend(struct device *dev)
{
struct dwc3_thead *thead = dev_get_drvdata(dev);
-
+ int ret;
dwc3_thead_assert(thead);
clk_bulk_disable(thead->num_clocks, thead->clks);
+ ret = regulator_disable(thead->vbus);
+ if (ret) {
+ dev_err(dev, "failed to disable regulator vbus %d\n", ret);
+ }
+ ret = regulator_disable(thead->hub1v2);
+ if (ret) {
+ dev_err(dev, "failed to disable regulator hub1v2 %d\n", ret);
+ }
+ ret = regulator_disable(thead->hub5v);
+
+ if (ret) {
+ dev_err(dev, "failed to disable regulator hub1v2 %d\n", ret);
+ }
return 0;
}
{
struct dwc3_thead *thead = dev_get_drvdata(dev);
int ret;
+ dev_info(dev,"%s\n",__func__);
+ ret = regulator_enable(thead->vbus);
+ if (ret) {
+ dev_err(dev, "failed to enable regulator vbus %d\n", ret);
+ }
+ ret = regulator_enable(thead->hub1v2);
+ if (ret) {
+ dev_err(dev, "failed to enable regulator hub1v2 %d\n", ret);
+ }
+ ret = regulator_enable(thead->hub5v);
+
+ if (ret) {
+ dev_err(dev, "failed to enable regulator hub1v2 %d\n", ret);
+ }
ret = clk_bulk_prepare_enable(thead->num_clocks, thead->clks);
if (ret) {