From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen-Yu Tsai Subject: [PATCH RFC 3/6] net: rfkill: gpio: fix reversed clock enable state Date: Fri, 17 Jan 2014 14:47:28 +0800 Message-ID: <1389941251-32692-4-git-send-email-wens@csie.org> References: <1389941251-32692-1-git-send-email-wens@csie.org> Reply-To: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <1389941251-32692-1-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> List-Post: , List-Help: , List-Archive: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Subscribe: , List-Unsubscribe: , To: Johannes Berg , "David S. Miller" Cc: Chen-Yu Tsai , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Maxime Ripard , linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org rfkill-gpio has clk_enabled = blocked, which is true when rfkill blocks the device. This results in calling clock enable/disable at the wrong time. Reversing the value fixes this. Signed-off-by: Chen-Yu Tsai --- net/rfkill/rfkill-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c index c7081b7..3084fa3 100644 --- a/net/rfkill/rfkill-gpio.c +++ b/net/rfkill/rfkill-gpio.c @@ -59,7 +59,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked) gpiod_set_value(rfkill->shutdown_gpio, 1); } - rfkill->clk_enabled = blocked; + rfkill->clk_enabled = !blocked; return 0; } -- 1.8.5.2