]> Git Repo - linux.git/commitdiff
pwm: Always allocate PWM chip base ID dynamically
authorUwe Kleine-König <[email protected]>
Mon, 1 Mar 2021 18:57:19 +0000 (19:57 +0100)
committerThierry Reding <[email protected]>
Mon, 22 Mar 2021 10:53:00 +0000 (11:53 +0100)
Since commit 5e5da1e9fbee ("pwm: ab8500: Explicitly allocate pwm chip
base dynamically") all drivers use dynamic ID allocation explicitly. New
drivers are supposed to do the same, so remove support for driver
specified base IDs and drop all assignments in the low-level drivers.

Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
55 files changed:
drivers/pwm/core.c
drivers/pwm/pwm-ab8500.c
drivers/pwm/pwm-atmel-hlcdc.c
drivers/pwm/pwm-atmel-tcb.c
drivers/pwm/pwm-atmel.c
drivers/pwm/pwm-bcm-iproc.c
drivers/pwm/pwm-bcm-kona.c
drivers/pwm/pwm-bcm2835.c
drivers/pwm/pwm-berlin.c
drivers/pwm/pwm-brcmstb.c
drivers/pwm/pwm-clps711x.c
drivers/pwm/pwm-crc.c
drivers/pwm/pwm-cros-ec.c
drivers/pwm/pwm-dwc.c
drivers/pwm/pwm-ep93xx.c
drivers/pwm/pwm-fsl-ftm.c
drivers/pwm/pwm-hibvt.c
drivers/pwm/pwm-img.c
drivers/pwm/pwm-imx-tpm.c
drivers/pwm/pwm-imx1.c
drivers/pwm/pwm-imx27.c
drivers/pwm/pwm-intel-lgm.c
drivers/pwm/pwm-iqs620a.c
drivers/pwm/pwm-jz4740.c
drivers/pwm/pwm-keembay.c
drivers/pwm/pwm-lp3943.c
drivers/pwm/pwm-lpc18xx-sct.c
drivers/pwm/pwm-lpc32xx.c
drivers/pwm/pwm-lpss.c
drivers/pwm/pwm-mediatek.c
drivers/pwm/pwm-meson.c
drivers/pwm/pwm-mtk-disp.c
drivers/pwm/pwm-mxs.c
drivers/pwm/pwm-omap-dmtimer.c
drivers/pwm/pwm-pca9685.c
drivers/pwm/pwm-pxa.c
drivers/pwm/pwm-rcar.c
drivers/pwm/pwm-renesas-tpu.c
drivers/pwm/pwm-rockchip.c
drivers/pwm/pwm-samsung.c
drivers/pwm/pwm-sifive.c
drivers/pwm/pwm-sl28cpld.c
drivers/pwm/pwm-spear.c
drivers/pwm/pwm-sprd.c
drivers/pwm/pwm-sti.c
drivers/pwm/pwm-stm32-lp.c
drivers/pwm/pwm-stm32.c
drivers/pwm/pwm-stmpe.c
drivers/pwm/pwm-sun4i.c
drivers/pwm/pwm-tegra.c
drivers/pwm/pwm-tiecap.c
drivers/pwm/pwm-tiehrpwm.c
drivers/pwm/pwm-twl-led.c
drivers/pwm/pwm-twl.c
drivers/pwm/pwm-vt8500.c

index a8eff4b3ee368916b7c6e31107b8f072867dcfab..8904eaa6d769d830ebe2ba4cf5e9b795738bd0d4 100644 (file)
@@ -37,23 +37,13 @@ static struct pwm_device *pwm_to_device(unsigned int pwm)
        return radix_tree_lookup(&pwm_tree, pwm);
 }
 
-static int alloc_pwms(int pwm, unsigned int count)
+static int alloc_pwms(unsigned int count)
 {
-       unsigned int from = 0;
        unsigned int start;
 
-       if (pwm >= MAX_PWMS)
-               return -EINVAL;
-
-       if (pwm >= 0)
-               from = pwm;
-
-       start = bitmap_find_next_zero_area(allocated_pwms, MAX_PWMS, from,
+       start = bitmap_find_next_zero_area(allocated_pwms, MAX_PWMS, 0,
                                           count, 0);
 
-       if (pwm >= 0 && start != pwm)
-               return -EEXIST;
-
        if (start + count > MAX_PWMS)
                return -ENOSPC;
 
@@ -264,9 +254,8 @@ static bool pwm_ops_check(const struct pwm_chip *chip)
  * @chip: the PWM chip to add
  * @polarity: initial polarity of PWM channels
  *
- * Register a new PWM chip. If chip->base < 0 then a dynamically assigned base
- * will be used. The initial polarity for all channels is specified by the
- * @polarity parameter.
+ * Register a new PWM chip. The initial polarity for all channels is specified
+ * by the @polarity parameter.
  *
  * Returns: 0 on success or a negative error code on failure.
  */
@@ -285,18 +274,18 @@ int pwmchip_add_with_polarity(struct pwm_chip *chip,
 
        mutex_lock(&pwm_lock);
 
-       ret = alloc_pwms(chip->base, chip->npwm);
+       ret = alloc_pwms(chip->npwm);
        if (ret < 0)
                goto out;
 
+       chip->base = ret;
+
        chip->pwms = kcalloc(chip->npwm, sizeof(*pwm), GFP_KERNEL);
        if (!chip->pwms) {
                ret = -ENOMEM;
                goto out;
        }
 
-       chip->base = ret;
-
        for (i = 0; i < chip->npwm; i++) {
                pwm = &chip->pwms[i];
 
index 5b0a71243d0fac8d748046a14bd9b360c9c97307..e2a26d9da25b3985145718071a958a8a1fc844e5 100644 (file)
@@ -98,7 +98,6 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
 
        ab8500->chip.dev = &pdev->dev;
        ab8500->chip.ops = &ab8500_pwm_ops;
-       ab8500->chip.base = -1;
        ab8500->chip.npwm = 1;
 
        err = pwmchip_add(&ab8500->chip);
index dcbc0489dfd401c5aad3032bafb8057748c7d4dc..538dbafe3e750fc8ed9d76c165759b34865736f9 100644 (file)
@@ -265,7 +265,6 @@ static int atmel_hlcdc_pwm_probe(struct platform_device *pdev)
        chip->hlcdc = hlcdc;
        chip->chip.ops = &atmel_hlcdc_pwm_ops;
        chip->chip.dev = dev;
-       chip->chip.base = -1;
        chip->chip.npwm = 1;
        chip->chip.of_xlate = of_pwm_xlate_with_flags;
        chip->chip.of_pwm_n_cells = 3;
index 5ccc3e7420e90ae33691ef4f0a4f4f99beaf72f3..ee70a615532b426df9adcf2c937a1209e1a6d194 100644 (file)
@@ -454,7 +454,6 @@ static int atmel_tcb_pwm_probe(struct platform_device *pdev)
        tcbpwm->chip.ops = &atmel_tcb_pwm_ops;
        tcbpwm->chip.of_xlate = of_pwm_xlate_with_flags;
        tcbpwm->chip.of_pwm_n_cells = 3;
-       tcbpwm->chip.base = -1;
        tcbpwm->chip.npwm = NPWM;
        tcbpwm->channel = channel;
        tcbpwm->regmap = regmap;
index 5813339b597b92ab9fd0f74a05e6846c79a8fe50..a4d0be6b265b8f4b05560daa6887548aa7f90ee3 100644 (file)
@@ -429,7 +429,6 @@ static int atmel_pwm_probe(struct platform_device *pdev)
        atmel_pwm->chip.ops = &atmel_pwm_ops;
        atmel_pwm->chip.of_xlate = of_pwm_xlate_with_flags;
        atmel_pwm->chip.of_pwm_n_cells = 3;
-       atmel_pwm->chip.base = -1;
        atmel_pwm->chip.npwm = 4;
 
        ret = pwmchip_add(&atmel_pwm->chip);
index f4853c4a2d756a78501d39eba8dfacefab0cea23..529a66ab692d96162cf96270390baacb44a8fa3c 100644 (file)
@@ -209,7 +209,6 @@ static int iproc_pwmc_probe(struct platform_device *pdev)
 
        ip->chip.dev = &pdev->dev;
        ip->chip.ops = &iproc_pwm_ops;
-       ip->chip.base = -1;
        ip->chip.npwm = 4;
        ip->chip.of_xlate = of_pwm_xlate_with_flags;
        ip->chip.of_pwm_n_cells = 3;
index 578b3621c97e818d09f2d55d386990e19656ae67..2e8aede0318cc92408ebd7ad5a905cd897beedab 100644 (file)
@@ -271,7 +271,6 @@ static int kona_pwmc_probe(struct platform_device *pdev)
 
        kp->chip.dev = &pdev->dev;
        kp->chip.ops = &kona_pwm_ops;
-       kp->chip.base = -1;
        kp->chip.npwm = 6;
        kp->chip.of_xlate = of_pwm_xlate_with_flags;
        kp->chip.of_pwm_n_cells = 3;
index d593cce249d94793ba1b0a170e64b2424c2b534d..e4b54675b356fe774cfa8f55d120f362d51524a4 100644 (file)
@@ -158,7 +158,6 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
 
        pc->chip.dev = &pdev->dev;
        pc->chip.ops = &bcm2835_pwm_ops;
-       pc->chip.base = -1;
        pc->chip.npwm = 2;
        pc->chip.of_xlate = of_pwm_xlate_with_flags;
        pc->chip.of_pwm_n_cells = 3;
index fe405289e582cb8ee0851065660ef9b052f8f256..acb6fbc3cc32d7fe45287227cf6d7c78a719aecd 100644 (file)
@@ -206,7 +206,6 @@ static int berlin_pwm_probe(struct platform_device *pdev)
 
        pwm->chip.dev = &pdev->dev;
        pwm->chip.ops = &berlin_pwm_ops;
-       pwm->chip.base = -1;
        pwm->chip.npwm = 4;
        pwm->chip.of_xlate = of_pwm_xlate_with_flags;
        pwm->chip.of_pwm_n_cells = 3;
index 8b66f9d2f5896ca1250ef5f4ca9a60aa996f2fce..8b1d1e7aa856f5e7edef85c2ae21e84c4fb9b4a1 100644 (file)
@@ -258,7 +258,6 @@ static int brcmstb_pwm_probe(struct platform_device *pdev)
 
        p->chip.dev = &pdev->dev;
        p->chip.ops = &brcmstb_pwm_ops;
-       p->chip.base = -1;
        p->chip.npwm = 2;
 
        p->base = devm_platform_ioremap_resource(pdev, 0);
index cb1af86873ee1dfc15c93f942e91545c90fd1eb1..f3d17a590305dc54f548166d021cf4fc5c73b360 100644 (file)
@@ -128,7 +128,6 @@ static int clps711x_pwm_probe(struct platform_device *pdev)
 
        priv->chip.ops = &clps711x_pwm_ops;
        priv->chip.dev = &pdev->dev;
-       priv->chip.base = -1;
        priv->chip.npwm = 2;
        priv->chip.of_xlate = clps711x_pwm_xlate;
        priv->chip.of_pwm_n_cells = 1;
index 1e2276808b7ae3415537cd677486dc3bcdac7129..02522a9a30737f596f2cc7bc3d9bd517312fe99f 100644 (file)
@@ -168,7 +168,6 @@ static int crystalcove_pwm_probe(struct platform_device *pdev)
 
        pwm->chip.dev = &pdev->dev;
        pwm->chip.ops = &crc_pwm_ops;
-       pwm->chip.base = -1;
        pwm->chip.npwm = 1;
 
        /* get the PMIC regmap */
index c1c337969e4ecb45520c3e03b2f3c38047f8bd75..d3115cb0e058ed3abdbda6798d950fd9ce1aae45 100644 (file)
@@ -253,7 +253,6 @@ static int cros_ec_pwm_probe(struct platform_device *pdev)
        chip->ops = &cros_ec_pwm_ops;
        chip->of_xlate = cros_ec_pwm_xlate;
        chip->of_pwm_n_cells = 1;
-       chip->base = -1;
        ret = cros_ec_num_pwms(ec);
        if (ret < 0) {
                dev_err(dev, "Couldn't find PWMs: %d\n", ret);
index f6c98e0d57c209c549401e98c420011c909dd369..7568300bb11e5246e482df2fe835120863268402 100644 (file)
@@ -233,7 +233,6 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id)
        dwc->chip.dev = dev;
        dwc->chip.ops = &dwc_pwm_ops;
        dwc->chip.npwm = DWC_TIMERS_TOTAL;
-       dwc->chip.base = -1;
 
        ret = pwmchip_add(&dwc->chip);
        if (ret)
index c9fc6f223640b63e9a7bc0bd7ac01893c9baaee6..4ca70794ad966ab8d6672e4e842161080361eda8 100644 (file)
@@ -185,7 +185,6 @@ static int ep93xx_pwm_probe(struct platform_device *pdev)
 
        ep93xx_pwm->chip.dev = &pdev->dev;
        ep93xx_pwm->chip.ops = &ep93xx_pwm_ops;
-       ep93xx_pwm->chip.base = -1;
        ep93xx_pwm->chip.npwm = 1;
 
        ret = pwmchip_add(&ep93xx_pwm->chip);
index 2a6801226aba1621b0251c7a860515ded0f868f2..0e1ae9469edab480aa8b807daa04d5b4b33486e8 100644 (file)
@@ -453,7 +453,6 @@ static int fsl_pwm_probe(struct platform_device *pdev)
        fpc->chip.ops = &fsl_pwm_ops;
        fpc->chip.of_xlate = of_pwm_xlate_with_flags;
        fpc->chip.of_pwm_n_cells = 3;
-       fpc->chip.base = -1;
        fpc->chip.npwm = 8;
 
        ret = pwmchip_add(&fpc->chip);
index a1900d0a872e5b441b1095b6dbbf619849af9197..82d17fc75c210b91e1c10b486665b02b3f9b077c 100644 (file)
@@ -205,7 +205,6 @@ static int hibvt_pwm_probe(struct platform_device *pdev)
 
        pwm_chip->chip.ops = &hibvt_pwm_ops;
        pwm_chip->chip.dev = &pdev->dev;
-       pwm_chip->chip.base = -1;
        pwm_chip->chip.npwm = soc->num_pwms;
        pwm_chip->chip.of_xlate = of_pwm_xlate_with_flags;
        pwm_chip->chip.of_pwm_n_cells = 3;
index 6faf5b5a558421233c1808c0242c6c4b047a5331..cc37054589ccf8d470604b3a8a435c37d0dbf43e 100644 (file)
@@ -304,7 +304,6 @@ static int img_pwm_probe(struct platform_device *pdev)
 
        pwm->chip.dev = &pdev->dev;
        pwm->chip.ops = &img_pwm_ops;
-       pwm->chip.base = -1;
        pwm->chip.npwm = IMG_PWM_NPWM;
 
        ret = pwmchip_add(&pwm->chip);
index eec9ec4e1a2a7aa0c3d48fb6889c71ee7afbbaf8..97c9133b687629a35a20ebaa7c8678f3ba47ed00 100644 (file)
@@ -363,7 +363,6 @@ static int pwm_imx_tpm_probe(struct platform_device *pdev)
 
        tpm->chip.dev = &pdev->dev;
        tpm->chip.ops = &imx_tpm_pwm_ops;
-       tpm->chip.base = -1;
        tpm->chip.of_xlate = of_pwm_xlate_with_flags;
        tpm->chip.of_pwm_n_cells = 3;
 
index 727e0d3e249ea18eda7041d7f41969034f26cb20..c957b365448eeb3dcd60a14f755f2903b6b63017 100644 (file)
@@ -155,7 +155,6 @@ static int pwm_imx1_probe(struct platform_device *pdev)
 
        imx->chip.ops = &pwm_imx1_ops;
        imx->chip.dev = &pdev->dev;
-       imx->chip.base = -1;
        imx->chip.npwm = 1;
 
        imx->mmio_base = devm_platform_ioremap_resource(pdev, 0);
index 18055326a2f38b1d4f520b2a12b4db17de5f4c16..ba695115c16091f3240d8947fde72e45860d1059 100644 (file)
@@ -327,7 +327,6 @@ static int pwm_imx27_probe(struct platform_device *pdev)
 
        imx->chip.ops = &pwm_imx27_ops;
        imx->chip.dev = &pdev->dev;
-       imx->chip.base = -1;
        imx->chip.npwm = 1;
 
        imx->chip.of_xlate = of_pwm_xlate_with_flags;
index e9e54dda07aa08009d17bbc6f1185a4da8278583..015f5eba09a1f90c0b368960da411e12a04ff3f3 100644 (file)
@@ -207,7 +207,6 @@ static int lgm_pwm_probe(struct platform_device *pdev)
        pc->chip.dev = dev;
        pc->chip.ops = &lgm_pwm_ops;
        pc->chip.npwm = 1;
-       pc->chip.base = -1;
 
        lgm_pwm_init(pc);
 
index 957b972c458bcefb687cfd96239bfa32d0cbbbf4..6c6e26d183296a79b4a7354a4538b84c31d2f9bd 100644 (file)
@@ -206,7 +206,6 @@ static int iqs620_pwm_probe(struct platform_device *pdev)
 
        iqs620_pwm->chip.dev = &pdev->dev;
        iqs620_pwm->chip.ops = &iqs620_pwm_ops;
-       iqs620_pwm->chip.base = -1;
        iqs620_pwm->chip.npwm = 1;
 
        mutex_init(&iqs620_pwm->lock);
index 00c642fa2eed15266e56f375b1fc2008aac1d986..5b6bdcdcecf582a2e5378ab59c11ef40c55f7bc7 100644 (file)
@@ -244,7 +244,6 @@ static int jz4740_pwm_probe(struct platform_device *pdev)
        jz4740->chip.dev = dev;
        jz4740->chip.ops = &jz4740_pwm_ops;
        jz4740->chip.npwm = info->num_pwms;
-       jz4740->chip.base = -1;
        jz4740->chip.of_xlate = of_pwm_xlate_with_flags;
        jz4740->chip.of_pwm_n_cells = 3;
 
index cdfdef66ff8e44c15b3a47568aabb84693094cee..521a825c8ba05f709ed3b4a245404c274944069c 100644 (file)
@@ -203,7 +203,6 @@ static int keembay_pwm_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       priv->chip.base = -1;
        priv->chip.dev = dev;
        priv->chip.ops = &keembay_pwm_ops;
        priv->chip.npwm = KMB_TOTAL_PWM_CHANNELS;
index bf3f14fb5f24436af1a22e4e55e295775844f9fe..7551253ada32b701ff82f9cbb8c5ecbc7d23b4c7 100644 (file)
@@ -275,7 +275,6 @@ static int lp3943_pwm_probe(struct platform_device *pdev)
        lp3943_pwm->chip.dev = &pdev->dev;
        lp3943_pwm->chip.ops = &lp3943_pwm_ops;
        lp3943_pwm->chip.npwm = LP3943_NUM_PWMS;
-       lp3943_pwm->chip.base = -1;
 
        platform_set_drvdata(pdev, lp3943_pwm);
 
index 7ef40243eb6c6be8378364a43d1529af5e337709..3f8e54ec28c6fe7908507b84912270b7bef49eaf 100644 (file)
@@ -370,7 +370,6 @@ static int lpc18xx_pwm_probe(struct platform_device *pdev)
 
        lpc18xx_pwm->chip.dev = &pdev->dev;
        lpc18xx_pwm->chip.ops = &lpc18xx_pwm_ops;
-       lpc18xx_pwm->chip.base = -1;
        lpc18xx_pwm->chip.npwm = 16;
        lpc18xx_pwm->chip.of_xlate = of_pwm_xlate_with_flags;
        lpc18xx_pwm->chip.of_pwm_n_cells = 3;
index 6b4090436c062e552a495d818a8b30b3def152e5..c42cc314c1708156f99306a95c61e480858e0391 100644 (file)
@@ -116,7 +116,6 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev)
        lpc32xx->chip.dev = &pdev->dev;
        lpc32xx->chip.ops = &lpc32xx_pwm_ops;
        lpc32xx->chip.npwm = 1;
-       lpc32xx->chip.base = -1;
 
        ret = pwmchip_add(&lpc32xx->chip);
        if (ret < 0) {
index 939de93c157b2fe69eda42e4698a1023ae700648..9ea6a176cbe5b69416968209b5eb05c0b7898422 100644 (file)
@@ -234,7 +234,6 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
 
        lpwm->chip.dev = dev;
        lpwm->chip.ops = &pwm_lpss_ops;
-       lpwm->chip.base = -1;
        lpwm->chip.npwm = info->npwm;
 
        ret = pwmchip_add(&lpwm->chip);
index fcfc3b147e5f5db94b9dc82a6c9b39c504ba04cd..87fb37d43814d8d05dad6ddc85ddb54782b48fe9 100644 (file)
@@ -263,7 +263,6 @@ static int pwm_mediatek_probe(struct platform_device *pdev)
 
        pc->chip.dev = &pdev->dev;
        pc->chip.ops = &pwm_mediatek_ops;
-       pc->chip.base = -1;
        pc->chip.npwm = pc->soc->num_pwms;
 
        ret = pwmchip_add(&pc->chip);
index a3ce9789412ae3fff322581b22b7f64ebb6f76ce..9eb060613cb45951c9b962a97aea58b72575f64d 100644 (file)
@@ -550,7 +550,6 @@ static int meson_pwm_probe(struct platform_device *pdev)
        spin_lock_init(&meson->lock);
        meson->chip.dev = &pdev->dev;
        meson->chip.ops = &meson_pwm_ops;
-       meson->chip.base = -1;
        meson->chip.npwm = MESON_NUM_PWMS;
        meson->chip.of_xlate = of_pwm_xlate_with_flags;
        meson->chip.of_pwm_n_cells = 3;
index 87c6b4bc5d439a4d09dcc0f0c318cb397ba9c8d0..9b3ba401a3dbfc4e64d6a760fe62416f5a8ebb91 100644 (file)
@@ -202,7 +202,6 @@ static int mtk_disp_pwm_probe(struct platform_device *pdev)
 
        mdp->chip.dev = &pdev->dev;
        mdp->chip.ops = &mtk_disp_pwm_ops;
-       mdp->chip.base = -1;
        mdp->chip.npwm = 1;
 
        ret = pwmchip_add(&mdp->chip);
index 7ce616923c52a89897a3ded707ca857e60c23650..0266e84e982cab0d8a7472a9a98ba84a81f98bee 100644 (file)
@@ -140,7 +140,6 @@ static int mxs_pwm_probe(struct platform_device *pdev)
        mxs->chip.ops = &mxs_pwm_ops;
        mxs->chip.of_xlate = of_pwm_xlate_with_flags;
        mxs->chip.of_pwm_n_cells = 3;
-       mxs->chip.base = -1;
 
        ret = of_property_read_u32(np, "fsl,pwm-number", &mxs->chip.npwm);
        if (ret < 0) {
index 358db4ff9d4f352f1abb3c59b49db629a5638045..612b3c85929536e009b7d2144aeb95a8a6780951 100644 (file)
@@ -403,7 +403,6 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
 
        omap->chip.dev = &pdev->dev;
        omap->chip.ops = &pwm_omap_dmtimer_ops;
-       omap->chip.base = -1;
        omap->chip.npwm = 1;
        omap->chip.of_xlate = of_pwm_xlate_with_flags;
        omap->chip.of_pwm_n_cells = 3;
index 4a55dc18656c51ce876cd4e086e78d26c11fd4e5..00976b2c57b2f9bcace4653fc6c4fc3c1d9343dc 100644 (file)
@@ -493,7 +493,6 @@ static int pca9685_pwm_probe(struct i2c_client *client,
        pca->chip.npwm = PCA9685_MAXCHAN + 1;
 
        pca->chip.dev = &client->dev;
-       pca->chip.base = -1;
 
        ret = pwmchip_add(&pca->chip);
        if (ret < 0)
index d06cf60e6575c6207a90cf25f31c42c76f5a9451..cfb683827d32ed8c37f2eee4b91fac328ed07233 100644 (file)
@@ -184,7 +184,6 @@ static int pwm_probe(struct platform_device *pdev)
 
        pwm->chip.dev = &pdev->dev;
        pwm->chip.ops = &pxa_pwm_ops;
-       pwm->chip.base = -1;
        pwm->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1;
 
        if (IS_ENABLED(CONFIG_OF)) {
index 002ab79a7ec24ce73389ec98c002e982a65da363..9daca0c772c71408fd46cd7c275d07a6b564b6b9 100644 (file)
@@ -224,7 +224,6 @@ static int rcar_pwm_probe(struct platform_device *pdev)
 
        rcar_pwm->chip.dev = &pdev->dev;
        rcar_pwm->chip.ops = &rcar_pwm_ops;
-       rcar_pwm->chip.base = -1;
        rcar_pwm->chip.npwm = 1;
 
        pm_runtime_enable(&pdev->dev);
index d02b24b77cdf73089bf8a44216899914f9808e95..e2959fae0969cb1f7f4d3b88f3da0bb86882f4d0 100644 (file)
@@ -410,7 +410,6 @@ static int tpu_probe(struct platform_device *pdev)
        tpu->chip.ops = &tpu_pwm_ops;
        tpu->chip.of_xlate = of_pwm_xlate_with_flags;
        tpu->chip.of_pwm_n_cells = 3;
-       tpu->chip.base = -1;
        tpu->chip.npwm = TPU_CHANNEL_MAX;
 
        pm_runtime_enable(&pdev->dev);
index 6ad7d0a50aeda768db490453701609bfb34c9cb4..301785fa293eba05e5b300582ed9697e28bb287f 100644 (file)
@@ -352,7 +352,6 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
        pc->data = id->data;
        pc->chip.dev = &pdev->dev;
        pc->chip.ops = &rockchip_pwm_ops;
-       pc->chip.base = -1;
        pc->chip.npwm = 1;
 
        if (pc->data->supports_polarity) {
index 645d0066ff0aaf336672248678cc4b3782afc400..515489fa4f6d3826268f040708686880af672ca7 100644 (file)
@@ -519,7 +519,6 @@ static int pwm_samsung_probe(struct platform_device *pdev)
 
        chip->chip.dev = &pdev->dev;
        chip->chip.ops = &pwm_samsung_ops;
-       chip->chip.base = -1;
        chip->chip.npwm = SAMSUNG_PWM_NUM;
        chip->inverter_mask = BIT(SAMSUNG_PWM_NUM) - 1;
 
index 2a7cd2deaeea2e0071fc2f8f283814c9c55a9242..688737f091ac485808f69e13198638d09f3f700b 100644 (file)
@@ -244,7 +244,6 @@ static int pwm_sifive_probe(struct platform_device *pdev)
        chip->ops = &pwm_sifive_ops;
        chip->of_xlate = of_pwm_xlate_with_flags;
        chip->of_pwm_n_cells = 3;
-       chip->base = -1;
        chip->npwm = 4;
 
        ddata->regs = devm_platform_ioremap_resource(pdev, 0);
index 0b01ec25e2f0a6f41a63c90dd6aadf51234c474b..7a69c1a0c0603d9bae0919e107287b9f879a6fcf 100644 (file)
@@ -229,7 +229,6 @@ static int sl28cpld_pwm_probe(struct platform_device *pdev)
        chip = &priv->pwm_chip;
        chip->dev = &pdev->dev;
        chip->ops = &sl28cpld_pwm_ops;
-       chip->base = -1;
        chip->npwm = 1;
 
        platform_set_drvdata(pdev, priv);
index f63b54aae1b48e2634e07692a7884c64771a709e..1a1cedfd11ce2dd1253f628580f975da229575d7 100644 (file)
@@ -193,7 +193,6 @@ static int spear_pwm_probe(struct platform_device *pdev)
 
        pc->chip.dev = &pdev->dev;
        pc->chip.ops = &spear_pwm_ops;
-       pc->chip.base = -1;
        pc->chip.npwm = NUM_PWM;
 
        ret = clk_prepare(pc->clk);
index 5123d948efd6ff7900e2e644fbf0213d9248669e..108cbec88667bf8e0c91038112f9371e5a30dbed 100644 (file)
@@ -268,7 +268,6 @@ static int sprd_pwm_probe(struct platform_device *pdev)
 
        spc->chip.dev = &pdev->dev;
        spc->chip.ops = &sprd_pwm_ops;
-       spc->chip.base = -1;
        spc->chip.npwm = spc->num_pwms;
 
        ret = pwmchip_add(&spc->chip);
index 99c70e07858df17995bb07cd5ddc62f38c978a04..aa2b211d7ee3741476d563619f551fb342b107aa 100644 (file)
@@ -619,7 +619,6 @@ static int sti_pwm_probe(struct platform_device *pdev)
 
        pc->chip.dev = dev;
        pc->chip.ops = &sti_pwm_ops;
-       pc->chip.base = -1;
        pc->chip.npwm = pc->cdata->pwm_num_devs;
 
        ret = pwmchip_add(&pc->chip);
index 134c14621ee011c816830d26b1f7ac4974f40c40..af08f564ef1d31c1f49aa6f7b11f03659487b0a3 100644 (file)
@@ -205,7 +205,6 @@ static int stm32_pwm_lp_probe(struct platform_device *pdev)
 
        priv->regmap = ddata->regmap;
        priv->clk = ddata->clk;
-       priv->chip.base = -1;
        priv->chip.dev = &pdev->dev;
        priv->chip.ops = &stm32_pwm_lp_ops;
        priv->chip.npwm = 1;
index d3be944f2ae96dbf3313ec593956ca440f1eb8c3..c46fb90036ab4fc350c255468b7b015e467e4517 100644 (file)
@@ -633,7 +633,6 @@ static int stm32_pwm_probe(struct platform_device *pdev)
 
        stm32_pwm_detect_complementary(priv);
 
-       priv->chip.base = -1;
        priv->chip.dev = dev;
        priv->chip.ops = &stm32pwm_ops;
        priv->chip.npwm = stm32_pwm_detect_channels(priv);
index be5f6d7359d4f9d189956b0478753d2a2a6776c6..9dc983a3cbf1b1f427396378e80e8de8940ad3ea 100644 (file)
@@ -278,7 +278,6 @@ static int __init stmpe_pwm_probe(struct platform_device *pdev)
 
        pwm->stmpe = stmpe;
        pwm->chip.dev = &pdev->dev;
-       pwm->chip.base = -1;
 
        if (stmpe->partnum == STMPE2401 || stmpe->partnum == STMPE2403) {
                pwm->chip.ops = &stmpe_24xx_pwm_ops;
index ce5c4fc8da6f04287296a1b633132cceaac9906e..e01becd102c0a2bafe7c50c08c76bebdb3ab4cfa 100644 (file)
@@ -459,7 +459,6 @@ static int sun4i_pwm_probe(struct platform_device *pdev)
 
        pwm->chip.dev = &pdev->dev;
        pwm->chip.ops = &sun4i_pwm_ops;
-       pwm->chip.base = -1;
        pwm->chip.npwm = pwm->data->npwm;
        pwm->chip.of_xlate = of_pwm_xlate_with_flags;
        pwm->chip.of_pwm_n_cells = 3;
index 55bc63d5a0ae1df87820e91728cdaa9fed1d5343..c529a170bcdd160a41097f8733367f8ced3ac240 100644 (file)
@@ -285,7 +285,6 @@ static int tegra_pwm_probe(struct platform_device *pdev)
 
        pwm->chip.dev = &pdev->dev;
        pwm->chip.ops = &tegra_pwm_ops;
-       pwm->chip.base = -1;
        pwm->chip.npwm = pwm->soc->num_channels;
 
        ret = pwmchip_add(&pwm->chip);
index 2a8949014bb1882e0b776eae5dbbbc2d760c6706..b9a17ab0c202abdd3ebf73d03f0737febd238123 100644 (file)
@@ -226,7 +226,6 @@ static int ecap_pwm_probe(struct platform_device *pdev)
        pc->chip.ops = &ecap_pwm_ops;
        pc->chip.of_xlate = of_pwm_xlate_with_flags;
        pc->chip.of_pwm_n_cells = 3;
-       pc->chip.base = -1;
        pc->chip.npwm = 1;
 
        pc->mmio_base = devm_platform_ioremap_resource(pdev, 0);
index a7fb224d65350cf054111ba547a99144924751fc..90095a19bf2da9667ce6bb889500fae4b0675a16 100644 (file)
@@ -449,7 +449,6 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
        pc->chip.ops = &ehrpwm_pwm_ops;
        pc->chip.of_xlate = of_pwm_xlate_with_flags;
        pc->chip.of_pwm_n_cells = 3;
-       pc->chip.base = -1;
        pc->chip.npwm = NUM_PWM_CHANNEL;
 
        pc->mmio_base = devm_platform_ioremap_resource(pdev, 0);
index 630b9a57882033b11f7e034b94e361d33f4478b1..6c8df5f4e87d660dd57a8ef3b79ff7b1fb9cb57c 100644 (file)
@@ -291,7 +291,6 @@ static int twl_pwmled_probe(struct platform_device *pdev)
        }
 
        twl->chip.dev = &pdev->dev;
-       twl->chip.base = -1;
 
        mutex_init(&twl->mutex);
 
index aee67974f3534f749527817e1a72def6694860a4..e83a826bf62166eac1e2a4062582eaa68a81283c 100644 (file)
@@ -310,7 +310,6 @@ static int twl_pwm_probe(struct platform_device *pdev)
                twl->chip.ops = &twl6030_pwm_ops;
 
        twl->chip.dev = &pdev->dev;
-       twl->chip.base = -1;
        twl->chip.npwm = 2;
 
        mutex_init(&twl->mutex);
index 6e36851a22bb09dd7cdbdf685241b8c6ce543b73..52fe5d19473aab75a873d5a4876e49cd89e8990a 100644 (file)
@@ -209,7 +209,6 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
        chip->chip.ops = &vt8500_pwm_ops;
        chip->chip.of_xlate = of_pwm_xlate_with_flags;
        chip->chip.of_pwm_n_cells = 3;
-       chip->chip.base = -1;
        chip->chip.npwm = VT8500_NR_PWMS;
 
        chip->clk = devm_clk_get(&pdev->dev, NULL);
This page took 0.115707 seconds and 4 git commands to generate.