Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300890 > unrolled thread
| Started by | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| First post | 2016-01-04 18:10 +0100 |
| Last post | 2016-01-11 20:30 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-04 18:10 +0100
Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-05 01:00 +0100
Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-05 01:10 +0100
Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-05 01:10 +0100
Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-11 20:30 +0100
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2016-01-04 18:10 +0100 |
| Subject | Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields |
| Message-ID | <qNgNQ-6jM-1@gated-at.bofh.it> |
Hi,
On 30/12/2015 at 13:47:25 +0900, Krzysztof Kozlowski wrote :
> Remove the 'rtc' prefix from some of the fields in struct
> s5m_rtc_reg_config because it is obvious - this is a RTC driver. No
> functional changes.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>
I was going to apply those patches but they don't apply cleanly on
rtc-next. Did I miss something?
> ---
>
> Changes since v1:
> 1. None.
> ---
> drivers/rtc/rtc-s5m.c | 40 +++++++++++++++++++---------------------
> 1 file changed, 19 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
> index 0d68a85dd429..85649861a6b0 100644
> --- a/drivers/rtc/rtc-s5m.c
> +++ b/drivers/rtc/rtc-s5m.c
> @@ -55,9 +55,9 @@ struct s5m_rtc_reg_config {
> * will enable update of time or alarm register. Then it will be
> * auto-cleared after successful update.
> */
> - unsigned int rtc_udr_update;
> - /* Mask for UDR field in 'rtc_udr_update' register */
> - unsigned int rtc_udr_mask;
> + unsigned int udr_update;
> + /* Mask for UDR field in 'udr_update' register */
> + unsigned int udr_mask;
> };
>
> /* Register map for S5M8763 and S5M8767 */
> @@ -67,8 +67,8 @@ static const struct s5m_rtc_reg_config s5m_rtc_regs = {
> .ctrl = S5M_ALARM1_CONF,
> .alarm0 = S5M_ALARM0_SEC,
> .alarm1 = S5M_ALARM1_SEC,
> - .rtc_udr_update = S5M_RTC_UDR_CON,
> - .rtc_udr_mask = S5M_RTC_UDR_MASK,
> + .udr_update = S5M_RTC_UDR_CON,
> + .udr_mask = S5M_RTC_UDR_MASK,
> };
>
> /*
> @@ -81,8 +81,8 @@ static const struct s5m_rtc_reg_config s2mps_rtc_regs = {
> .ctrl = S2MPS_RTC_CTRL,
> .alarm0 = S2MPS_ALARM0_SEC,
> .alarm1 = S2MPS_ALARM1_SEC,
> - .rtc_udr_update = S2MPS_RTC_UDR_CON,
> - .rtc_udr_mask = S2MPS_RTC_WUDR_MASK,
> + .udr_update = S2MPS_RTC_UDR_CON,
> + .udr_mask = S2MPS_RTC_WUDR_MASK,
> };
>
> struct s5m_rtc_info {
> @@ -166,9 +166,8 @@ static inline int s5m8767_wait_for_udr_update(struct s5m_rtc_info *info)
> unsigned int data;
>
> do {
> - ret = regmap_read(info->regmap, info->regs->rtc_udr_update,
> - &data);
> - } while (--retry && (data & info->regs->rtc_udr_mask) && !ret);
> + ret = regmap_read(info->regmap, info->regs->udr_update, &data);
> + } while (--retry && (data & info->regs->udr_mask) && !ret);
>
> if (!retry)
> dev_err(info->dev, "waiting for UDR update, reached max number of retries\n");
> @@ -214,7 +213,7 @@ static inline int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info)
> int ret;
> unsigned int data;
>
> - ret = regmap_read(info->regmap, info->regs->rtc_udr_update, &data);
> + ret = regmap_read(info->regmap, info->regs->udr_update, &data);
> if (ret < 0) {
> dev_err(info->dev, "failed to read update reg(%d)\n", ret);
> return ret;
> @@ -223,21 +222,20 @@ static inline int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info)
> switch (info->device_type) {
> case S5M8763X:
> case S5M8767X:
> - data |= info->regs->rtc_udr_mask | S5M_RTC_TIME_EN_MASK;
> + data |= info->regs->udr_mask | S5M_RTC_TIME_EN_MASK;
> case S2MPS15X:
> /* As per UM, for write time register, set WUDR bit to high */
> data |= S2MPS15_RTC_WUDR_MASK;
> break;
> case S2MPS14X:
> case S2MPS13X:
> - data |= info->regs->rtc_udr_mask;
> + data |= info->regs->udr_mask;
> break;
> default:
> return -EINVAL;
> }
>
> -
> - ret = regmap_write(info->regmap, info->regs->rtc_udr_update, data);
> + ret = regmap_write(info->regmap, info->regs->udr_update, data);
> if (ret < 0) {
> dev_err(info->dev, "failed to write update reg(%d)\n", ret);
> return ret;
> @@ -253,14 +251,14 @@ static inline int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
> int ret;
> unsigned int data;
>
> - ret = regmap_read(info->regmap, info->regs->rtc_udr_update, &data);
> + ret = regmap_read(info->regmap, info->regs->udr_update, &data);
> if (ret < 0) {
> dev_err(info->dev, "%s: fail to read update reg(%d)\n",
> __func__, ret);
> return ret;
> }
>
> - data |= info->regs->rtc_udr_mask;
> + data |= info->regs->udr_mask;
> switch (info->device_type) {
> case S5M8763X:
> case S5M8767X:
> @@ -268,7 +266,7 @@ static inline int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
> break;
> case S2MPS15X:
> /* As per UM, for write alarm, set A_UDR(bit[4]) to high
> - * rtc_udr_mask above sets bit[4]
> + * udr_mask above sets bit[4]
> */
> break;
> case S2MPS14X:
> @@ -281,7 +279,7 @@ static inline int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
> return -EINVAL;
> }
>
> - ret = regmap_write(info->regmap, info->regs->rtc_udr_update, data);
> + ret = regmap_write(info->regmap, info->regs->udr_update, data);
> if (ret < 0) {
> dev_err(info->dev, "%s: fail to write update reg(%d)\n",
> __func__, ret);
> @@ -292,7 +290,7 @@ static inline int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
>
> /* On S2MPS13 the AUDR is not auto-cleared */
> if (info->device_type == S2MPS13X)
> - regmap_update_bits(info->regmap, info->regs->rtc_udr_update,
> + regmap_update_bits(info->regmap, info->regs->udr_update,
> S2MPS13_RTC_AUDR_MASK, 0);
>
> return ret;
> @@ -339,7 +337,7 @@ static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
> if (info->device_type == S2MPS15X || info->device_type == S2MPS14X ||
> info->device_type == S2MPS13X) {
> ret = regmap_update_bits(info->regmap,
> - info->regs->rtc_udr_update,
> + info->regs->udr_update,
> S2MPS_RTC_RUDR_MASK, S2MPS_RTC_RUDR_MASK);
> if (ret) {
> dev_err(dev,
> --
> 1.9.1
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-01-05 01:00 +0100 |
| Subject | Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields |
| Message-ID | <qNncB-1Z8-1@gated-at.bofh.it> |
| In reply to | #1300890 |
On 05.01.2016 02:08, Alexandre Belloni wrote: > Hi, > > On 30/12/2015 at 13:47:25 +0900, Krzysztof Kozlowski wrote : >> Remove the 'rtc' prefix from some of the fields in struct >> s5m_rtc_reg_config because it is obvious - this is a RTC driver. No >> functional changes. >> >> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> >> > > I was going to apply those patches but they don't apply cleanly on > rtc-next. Did I miss something? > Probably that's my fault because I rebased it on linux-next. I will rebase the patches on rtc-next and resend. Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2016-01-05 01:10 +0100 |
| Message-ID | <qNnmi-2ix-5@gated-at.bofh.it> |
| In reply to | #1301194 |
On 05/01/2016 at 09:04:39 +0900, Krzysztof Kozlowski wrote : > > > > Probably that's my fault because I rebased it on linux-next. I will > > rebase the patches on rtc-next and resend. > > Ah, no need for rebasing. I forgot about dependency - the support for > S2MPS15 was added recently through Lee Jones' tree. Fortunately Lee put > S2MPS15 patches in a separate branch and tag: "ib-mfd-regulator-rtc-4.5" > > This means that to apply the patches this is needed first: > https://git.kernel.org/cgit/linux/kernel/git/lee/mfd.git/log/?h=ib-mfd-regulator-rtc-4.5 > Ah, true, that's what I forgot, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2016-01-05 01:10 +0100 |
| Subject | Re: [PATCH v2 1/3] rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields |
| Message-ID | <qNnmi-2ix-7@gated-at.bofh.it> |
| In reply to | #1301194 |
On 05.01.2016 08:53, Krzysztof Kozlowski wrote: > On 05.01.2016 02:08, Alexandre Belloni wrote: >> Hi, >> >> On 30/12/2015 at 13:47:25 +0900, Krzysztof Kozlowski wrote : >>> Remove the 'rtc' prefix from some of the fields in struct >>> s5m_rtc_reg_config because it is obvious - this is a RTC driver. No >>> functional changes. >>> >>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> >>> >> >> I was going to apply those patches but they don't apply cleanly on >> rtc-next. Did I miss something? >> > > Probably that's my fault because I rebased it on linux-next. I will > rebase the patches on rtc-next and resend. Ah, no need for rebasing. I forgot about dependency - the support for S2MPS15 was added recently through Lee Jones' tree. Fortunately Lee put S2MPS15 patches in a separate branch and tag: "ib-mfd-regulator-rtc-4.5" This means that to apply the patches this is needed first: https://git.kernel.org/cgit/linux/kernel/git/lee/mfd.git/log/?h=ib-mfd-regulator-rtc-4.5 Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2016-01-11 20:30 +0100 |
| Message-ID | <qPQka-6HH-9@gated-at.bofh.it> |
| In reply to | #1301202 |
On 05/01/2016 at 09:04:39 +0900, Krzysztof Kozlowski wrote : > On 05.01.2016 08:53, Krzysztof Kozlowski wrote: > > On 05.01.2016 02:08, Alexandre Belloni wrote: > >> Hi, > >> > >> On 30/12/2015 at 13:47:25 +0900, Krzysztof Kozlowski wrote : > >>> Remove the 'rtc' prefix from some of the fields in struct > >>> s5m_rtc_reg_config because it is obvious - this is a RTC driver. No > >>> functional changes. > >>> > >>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > >>> > >> > >> I was going to apply those patches but they don't apply cleanly on > >> rtc-next. Did I miss something? > >> > > > > Probably that's my fault because I rebased it on linux-next. I will > > rebase the patches on rtc-next and resend. > > Ah, no need for rebasing. I forgot about dependency - the support for > S2MPS15 was added recently through Lee Jones' tree. Fortunately Lee put > S2MPS15 patches in a separate branch and tag: "ib-mfd-regulator-rtc-4.5" > > This means that to apply the patches this is needed first: > https://git.kernel.org/cgit/linux/kernel/git/lee/mfd.git/log/?h=ib-mfd-regulator-rtc-4.5 > All applied now, thanks -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web