mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
This commit is contained in:
commit
40a10fd740
60 changed files with 1489 additions and 732 deletions
|
@ -45,17 +45,14 @@ static int rfkill_gpio_set_power(void *data, bool blocked)
|
|||
{
|
||||
struct rfkill_gpio_data *rfkill = data;
|
||||
|
||||
if (blocked) {
|
||||
gpiod_set_value(rfkill->shutdown_gpio, 0);
|
||||
gpiod_set_value(rfkill->reset_gpio, 0);
|
||||
if (!IS_ERR(rfkill->clk) && rfkill->clk_enabled)
|
||||
clk_disable(rfkill->clk);
|
||||
} else {
|
||||
if (!IS_ERR(rfkill->clk) && !rfkill->clk_enabled)
|
||||
clk_enable(rfkill->clk);
|
||||
gpiod_set_value(rfkill->reset_gpio, 1);
|
||||
gpiod_set_value(rfkill->shutdown_gpio, 1);
|
||||
}
|
||||
if (!blocked && !IS_ERR(rfkill->clk) && !rfkill->clk_enabled)
|
||||
clk_enable(rfkill->clk);
|
||||
|
||||
gpiod_set_value_cansleep(rfkill->shutdown_gpio, !blocked);
|
||||
gpiod_set_value_cansleep(rfkill->reset_gpio, !blocked);
|
||||
|
||||
if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled)
|
||||
clk_disable(rfkill->clk);
|
||||
|
||||
rfkill->clk_enabled = blocked;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue