From patchwork Wed Jun 8 09:21:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 69626 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2391613qgf; Wed, 8 Jun 2016 02:27:11 -0700 (PDT) X-Received: by 10.98.29.196 with SMTP id d187mr4758102pfd.142.1465378031077; Wed, 08 Jun 2016 02:27:11 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id c74si423191pfk.221.2016.06.08.02.27.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jun 2016 02:27:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAZkJ-0004h7-7S; Wed, 08 Jun 2016 09:25:55 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAZgR-0007EL-Bb for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2016 09:21:58 +0000 Received: by mail-wm0-x22e.google.com with SMTP id m124so7682193wme.1 for ; Wed, 08 Jun 2016 02:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gh60wVqVlKzlmUK1uo9KbDjDQa73TAZFlEa4xtpMhPQ=; b=keMR3Cldyc4uxXu0fTFMbj2yFaqJPLe92eIiqMVnPnNUz+G5ihHm4b88Ifg6Xh7uSf oBLsNAJMrA5egSQ+HEripAY+T7vsVgDrKX+4L+TZQ+VaHnXPgeZHoCoAkcqOhI0mHjYO ePnvNWUUmguqpMO/Q0T9CVXHaCtQET4CHkHmw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gh60wVqVlKzlmUK1uo9KbDjDQa73TAZFlEa4xtpMhPQ=; b=lyo6MWsDRaQevmhJJLSWS+/WBu/Vej0yTZovBuDyu5DzYRsB9i8f0mh/iKhIiY/dZR VIRFV59EIZsqgtdOc6I57RjMXhG/5cRzZ9TaAnH9sq0TTVgm1wAvjfHQCGJrVgRycquk IVEK4qFrzoo2OoGRxIXIEBS1weps7FjznDWVz7+lW7jDWxf7r0NNzVt6ckILTZm3UvKq tOkKPyjs6r+YL8ZxMtY267FHVRHowA6RPdk/sijYV7+q6wm+9jLSmYNq7hTcOKSD3oFc EZyaIyubllA41MD52veEehVgfPEimu8rS9Ax2lyGwuZNe1vVyrid7g7OlyvRJWFOg9nZ QR6A== X-Gm-Message-State: ALyK8tLMOlIrIUsahxgWUeKD26RUk8Lnvhf416/l3pLRgQq6FcFXXD8PlHzIwsggmrsNmAnt X-Received: by 10.28.156.201 with SMTP id f192mr2189021wme.86.1465377693902; Wed, 08 Jun 2016 02:21:33 -0700 (PDT) Received: from localhost.localdomain (host81-129-171-215.range81-129.btcentralplus.com. [81.129.171.215]) by smtp.gmail.com with ESMTPSA id g192sm23694494wme.15.2016.06.08.02.21.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jun 2016 02:21:33 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 09/20] pwm: sti: Rename channel => device Date: Wed, 8 Jun 2016 10:21:24 +0100 Message-Id: <20160608092135.21184-10-lee.jones@linaro.org> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160608092135.21184-1-lee.jones@linaro.org> References: <20160608092135.21184-1-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160608_022155_765429_52F2D412 X-CRM114-Status: GOOD ( 18.20 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, kernel@stlinux.com, devicetree@vger.kernel.org, patrice.chotard@st.com, robh+dt@kernel.org, thierry.reding@gmail.com, Lee Jones , maxime.coquelin@st.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This is to bring the terminology used in the STi PWM driver more into line with the PWM subsystem. Signed-off-by: Lee Jones --- drivers/pwm/pwm-sti.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) -- 2.8.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/pwm/pwm-sti.c b/drivers/pwm/pwm-sti.c index 92abbd5..3dae127 100644 --- a/drivers/pwm/pwm-sti.c +++ b/drivers/pwm/pwm-sti.c @@ -21,7 +21,7 @@ #include #include -#define STI_DS_REG(ch) (4 * (ch)) /* Channel's Duty Cycle register */ +#define STI_DS_REG(ch) (4 * (ch)) /* Device's Duty Cycle register */ #define STI_PWMCR 0x50 /* Control/Config register */ #define STI_INTEN 0x54 /* Interrupt Enable/Disable register */ #define PWM_PRESCALE_LOW_MASK 0x0f @@ -40,7 +40,7 @@ enum { struct sti_pwm_compat_data { const struct reg_field *reg_fields; - unsigned int num_chan; + unsigned int num_devs; unsigned int max_pwm_cnt; unsigned int max_prescale; }; @@ -130,13 +130,13 @@ static int sti_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, /* Allow configuration changes if one of the * following conditions satisfy. - * 1. No channels have been configured. - * 2. Only one channel has been configured and the new request - * is for the same channel. - * 3. Only one channel has been configured and the new request is - * for a new channel and period of the new channel is same as + * 1. No devices have been configured. + * 2. Only one device has been configured and the new request + * is for the same device. + * 3. Only one device has been configured and the new request is + * for a new device and period of the new device is same as * the current configured period. - * 4. More than one channels are configured and period of the new + * 4. More than one devices are configured and period of the new * requestis the same as the current period. */ if (!ncfg || @@ -201,7 +201,7 @@ static int sti_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) int ret = 0; /* - * Since we have a common enable for all PWM channels, + * Since we have a common enable for all PWM devices, * do not enable if already enabled. */ mutex_lock(&pc->sti_pwm_lock); @@ -259,11 +259,11 @@ static int sti_pwm_probe_dt(struct sti_pwm_chip *pc) const struct reg_field *reg_fields; struct device_node *np = dev->of_node; struct sti_pwm_compat_data *cdata = pc->cdata; - u32 num_chan; + u32 num_devs; - of_property_read_u32(np, "st,pwm-num-chan", &num_chan); - if (num_chan) - cdata->num_chan = num_chan; + of_property_read_u32(np, "st,pwm-num-devs", &num_devs); + if (num_devs) + cdata->num_devs = num_devs; reg_fields = cdata->reg_fields; @@ -330,7 +330,7 @@ static int sti_pwm_probe(struct platform_device *pdev) cdata->reg_fields = &sti_pwm_regfields[0]; cdata->max_prescale = 0xff; cdata->max_pwm_cnt = 255; - cdata->num_chan = 1; + cdata->num_devs = 1; pc->cdata = cdata; pc->dev = dev; @@ -362,7 +362,7 @@ 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->num_chan; + pc->chip.npwm = pc->cdata->num_devs; pc->chip.can_sleep = true; ret = pwmchip_add(&pc->chip); @@ -381,7 +381,7 @@ static int sti_pwm_remove(struct platform_device *pdev) struct sti_pwm_chip *pc = platform_get_drvdata(pdev); unsigned int i; - for (i = 0; i < pc->cdata->num_chan; i++) + for (i = 0; i < pc->cdata->num_devs; i++) pwm_disable(&pc->chip.pwms[i]); clk_unprepare(pc->clk);