From: Thierry Reding Date: Fri, 10 Feb 2017 14:15:56 +0000 (+0100) Subject: Merge branch 'for-4.11/drivers' into for-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=38b0a526ec33314ee1d9926e3a347078f63eac8e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'for-4.11/drivers' into for-next --- 38b0a526ec33314ee1d9926e3a347078f63eac8e diff --cc drivers/pwm/pwm-imx.c index 1223187ad354,957099e82ed3..2ba5c3a398ff --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c @@@ -304,7 -289,14 +289,13 @@@ static int imx_pwm_probe(struct platfor imx->chip.dev = &pdev->dev; imx->chip.base = -1; imx->chip.npwm = 1; - imx->chip.can_sleep = true; + if (data->polarity_supported) { + dev_dbg(&pdev->dev, "PWM supports output inversion\n"); + imx->chip.of_xlate = of_pwm_xlate_with_flags; + imx->chip.of_pwm_n_cells = 3; + } + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); imx->mmio_base = devm_ioremap_resource(&pdev->dev, r); if (IS_ERR(imx->mmio_base)) diff --cc drivers/pwm/pwm-pca9685.c index c8282a2650be,5566760f7dc4..0cfb3571a732 --- a/drivers/pwm/pwm-pca9685.c +++ b/drivers/pwm/pwm-pca9685.c @@@ -343,8 -486,17 +486,16 @@@ static int pca9685_pwm_probe(struct i2c pca->chip.dev = &client->dev; pca->chip.base = -1; - pca->chip.can_sleep = true; - return pwmchip_add(&pca->chip); + ret = pwmchip_add(&pca->chip); + if (ret < 0) + return ret; + + ret = pca9685_pwm_gpio_probe(pca); + if (ret < 0) + pwmchip_remove(&pca->chip); + + return ret; } static int pca9685_pwm_remove(struct i2c_client *client)