mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Linux 4.16-rc5
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAlqlyPEeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGNa0H/RIa/StQuYu/SBwa JRqQFmkIsx+gG+FyamJrqGzRfyjounES8PbfyaN3cCrzYgeRwMp1U/bZW6/l5tkb OjTtrCJ6CJaa21fC/7aqn3rhejHciKyk83EinMu5WjDpsQcaF2xKr3SaPa62Ja24 fhawKq3CnUa+OUuAbicVX8yn4viUB6x8FjSN/IWfp3Cs4IBR7SGxxD7A4MET9FbQ 5OOu0al8ly9QeCggTtJyk+cApeLfexEBTbUur9gm7GcH9jhUtJSyZCZsDJx6M2yb CwdgF4fyk58c1fuHvTFb0AdUns55ba3nicybRHHMVbDpZIG9v4/M1yJETHHf5cD7 t3rFjrY= =+Ldf -----END PGP SIGNATURE----- Merge tag 'v4.16-rc5' into devel Linux 4.16-rc5 merged into the GPIO devel branch to resolve a nasty conflict between fixes and devel in the RCAR driver. Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
commit
95260c17b2
1242 changed files with 13451 additions and 8414 deletions
|
|
@ -14,7 +14,6 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/init.h>
|
||||
|
|
@ -47,10 +46,9 @@ struct gpio_rcar_priv {
|
|||
struct platform_device *pdev;
|
||||
struct gpio_chip gpio_chip;
|
||||
struct irq_chip irq_chip;
|
||||
struct clk *clk;
|
||||
unsigned int irq_parent;
|
||||
atomic_t wakeup_path;
|
||||
bool has_both_edge_trigger;
|
||||
bool needs_clk;
|
||||
struct gpio_rcar_bank_info bank_info;
|
||||
};
|
||||
|
||||
|
|
@ -197,13 +195,10 @@ static int gpio_rcar_irq_set_wake(struct irq_data *d, unsigned int on)
|
|||
}
|
||||
}
|
||||
|
||||
if (!p->clk)
|
||||
return 0;
|
||||
|
||||
if (on)
|
||||
clk_enable(p->clk);
|
||||
atomic_inc(&p->wakeup_path);
|
||||
else
|
||||
clk_disable(p->clk);
|
||||
atomic_dec(&p->wakeup_path);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -341,17 +336,14 @@ static int gpio_rcar_direction_output(struct gpio_chip *chip, unsigned offset,
|
|||
|
||||
struct gpio_rcar_info {
|
||||
bool has_both_edge_trigger;
|
||||
bool needs_clk;
|
||||
};
|
||||
|
||||
static const struct gpio_rcar_info gpio_rcar_info_gen1 = {
|
||||
.has_both_edge_trigger = false,
|
||||
.needs_clk = false,
|
||||
};
|
||||
|
||||
static const struct gpio_rcar_info gpio_rcar_info_gen2 = {
|
||||
.has_both_edge_trigger = true,
|
||||
.needs_clk = true,
|
||||
};
|
||||
|
||||
static const struct of_device_id gpio_rcar_of_table[] = {
|
||||
|
|
@ -414,7 +406,6 @@ static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins)
|
|||
ret = of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, 0, &args);
|
||||
*npins = ret == 0 ? args.args[2] : RCAR_MAX_GPIO_PER_BANK;
|
||||
p->has_both_edge_trigger = info->has_both_edge_trigger;
|
||||
p->needs_clk = info->needs_clk;
|
||||
|
||||
if (*npins == 0 || *npins > RCAR_MAX_GPIO_PER_BANK) {
|
||||
dev_warn(&p->pdev->dev,
|
||||
|
|
@ -451,16 +442,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, p);
|
||||
|
||||
p->clk = devm_clk_get(dev, NULL);
|
||||
if (IS_ERR(p->clk)) {
|
||||
if (p->needs_clk) {
|
||||
dev_err(dev, "unable to get clock\n");
|
||||
ret = PTR_ERR(p->clk);
|
||||
goto err0;
|
||||
}
|
||||
p->clk = NULL;
|
||||
}
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
|
|
@ -556,6 +537,9 @@ static int gpio_rcar_suspend(struct device *dev)
|
|||
if (p->has_both_edge_trigger)
|
||||
p->bank_info.bothedge = gpio_rcar_read(p, BOTHEDGE);
|
||||
|
||||
if (atomic_read(&p->wakeup_path))
|
||||
device_set_wakeup_path(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,6 +241,19 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
|||
|
||||
desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx,
|
||||
&of_flags);
|
||||
/*
|
||||
* -EPROBE_DEFER in our case means that we found a
|
||||
* valid GPIO property, but no controller has been
|
||||
* registered so far.
|
||||
*
|
||||
* This means we don't need to look any further for
|
||||
* alternate name conventions, and we should really
|
||||
* preserve the return code for our user to be able to
|
||||
* retry probing later.
|
||||
*/
|
||||
if (IS_ERR(desc) && PTR_ERR(desc) == -EPROBE_DEFER)
|
||||
return desc;
|
||||
|
||||
if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
|
||||
break;
|
||||
}
|
||||
|
|
@ -250,7 +263,7 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
|||
desc = of_find_spi_gpio(dev, con_id, &of_flags);
|
||||
|
||||
/* Special handling for regulator GPIOs if used */
|
||||
if (IS_ERR(desc))
|
||||
if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER)
|
||||
desc = of_find_regulator_gpio(dev, con_id, &of_flags);
|
||||
|
||||
if (IS_ERR(desc))
|
||||
|
|
|
|||
Loading…
Reference in a new issue