From: Crystal Guo <crystal.guo@mediatek.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Suman Anna <s-anna@ti.com>, "Andrew F. Davis" <afd@ti.com>
Cc: "Yong Liang (梁勇)" <Yong.Liang@mediatek.com>,
"Suman Anna" <s-anna@ti.com>,
srv_heupstream <srv_heupstream@mediatek.com>,
"Seiya Wang (王迺君)" <seiya.wang@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Andrew F. Davis" <afd@ti.com>,
"Fan Chen (陳凡)" <fan.chen@mediatek.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Yingjoe Chen (陳英洲)" <Yingjoe.Chen@mediatek.com>,
"Stanley Chu (朱原陞)" <stanley.chu@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [v2,5/6] reset-controller: ti: Introduce force-update method
Date: Mon, 10 Aug 2020 14:57:36 +0800 [thread overview]
Message-ID: <1597042656.11360.39.camel@mhfsdcap03> (raw)
In-Reply-To: <3413ca889fcef11c6dafe1d6b135e1887d84a6e4.camel@pengutronix.de>
On Tue, 2020-08-04 at 15:03 +0800, Philipp Zabel wrote:
> Hi Crystal,
>
> On Mon, 2020-08-03 at 14:15 +0800, Crystal Guo wrote:
> > Introduce force-update method for assert and deassert interface,
> > which force the write operation in case the read already happens
> > to return the correct value.
> >
> > Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
>
> Added Suman and Andrew for confirmation: I think writing unconditionally
> can't break any existing user. Just changing to regmap_write_bits()
> instead of adding the update-force property as in v1 should be fine.
>
> regards
> Philipp
>
Hi Suman, Andrew,
Can you help to give some suggestions about this change.
Is this can be changed to write unconditionally, or should I add a
update-force property to force the write operation.
Best regards
Crystal.
> > ---
> > drivers/reset/reset-ti-syscon.c | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c
> > index 1c74bcb9a6c3..f4baf78afd14 100644
> > --- a/drivers/reset/reset-ti-syscon.c
> > +++ b/drivers/reset/reset-ti-syscon.c
> > @@ -57,6 +57,7 @@ struct ti_syscon_reset_data {
> > struct ti_syscon_reset_control *controls;
> > unsigned int nr_controls;
> > bool assert_deassert_together;
> > + bool update_force;
> > };
> >
> > #define to_ti_syscon_reset_data(rcdev) \
> > @@ -90,7 +91,10 @@ static int ti_syscon_reset_assert(struct reset_controller_dev *rcdev,
> > mask = BIT(control->assert_bit);
> > value = (control->flags & ASSERT_SET) ? mask : 0x0;
> >
> > - return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
> > + if (data->update_force)
> > + return regmap_write_bits(data->regmap, control->assert_offset, mask, value);
> > + else
> > + return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
> > }
> >
> > /**
> > @@ -121,7 +125,10 @@ static int ti_syscon_reset_deassert(struct reset_controller_dev *rcdev,
> > mask = BIT(control->deassert_bit);
> > value = (control->flags & DEASSERT_SET) ? mask : 0x0;
> >
> > - return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
> > + if (data->update_force)
> > + return regmap_write_bits(data->regmap, control->deassert_offset, mask, value);
> > + else
> > + return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
> > }
> >
> > /**
> > @@ -223,6 +230,10 @@ static int ti_syscon_reset_probe(struct platform_device *pdev)
> > data->assert_deassert_together = true;
> > else
> > data->assert_deassert_together = false;
> > + if (of_property_read_bool(np, "update-force"))
> > + data->update_force = true;
> > + else
> > + data->update_force = false;
> >
> > data->rcdev.ops = &ti_syscon_reset_ops;
> > data->rcdev.owner = THIS_MODULE;
> > --
> > 2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Crystal Guo <crystal.guo@mediatek.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Suman Anna <s-anna@ti.com>, "Andrew F. Davis" <afd@ti.com>
Cc: "Yong Liang (梁勇)" <Yong.Liang@mediatek.com>,
srv_heupstream <srv_heupstream@mediatek.com>,
"Seiya Wang (王迺君)" <seiya.wang@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Andrew F. Davis" <afd@ti.com>,
"Fan Chen (陳凡)" <fan.chen@mediatek.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Yingjoe Chen (陳英洲)" <Yingjoe.Chen@mediatek.com>,
"Stanley Chu (朱原陞)" <stanley.chu@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [v2,5/6] reset-controller: ti: Introduce force-update method
Date: Mon, 10 Aug 2020 14:57:36 +0800 [thread overview]
Message-ID: <1597042656.11360.39.camel@mhfsdcap03> (raw)
In-Reply-To: <3413ca889fcef11c6dafe1d6b135e1887d84a6e4.camel@pengutronix.de>
On Tue, 2020-08-04 at 15:03 +0800, Philipp Zabel wrote:
> Hi Crystal,
>
> On Mon, 2020-08-03 at 14:15 +0800, Crystal Guo wrote:
> > Introduce force-update method for assert and deassert interface,
> > which force the write operation in case the read already happens
> > to return the correct value.
> >
> > Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
>
> Added Suman and Andrew for confirmation: I think writing unconditionally
> can't break any existing user. Just changing to regmap_write_bits()
> instead of adding the update-force property as in v1 should be fine.
>
> regards
> Philipp
>
Hi Suman, Andrew,
Can you help to give some suggestions about this change.
Is this can be changed to write unconditionally, or should I add a
update-force property to force the write operation.
Best regards
Crystal.
> > ---
> > drivers/reset/reset-ti-syscon.c | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c
> > index 1c74bcb9a6c3..f4baf78afd14 100644
> > --- a/drivers/reset/reset-ti-syscon.c
> > +++ b/drivers/reset/reset-ti-syscon.c
> > @@ -57,6 +57,7 @@ struct ti_syscon_reset_data {
> > struct ti_syscon_reset_control *controls;
> > unsigned int nr_controls;
> > bool assert_deassert_together;
> > + bool update_force;
> > };
> >
> > #define to_ti_syscon_reset_data(rcdev) \
> > @@ -90,7 +91,10 @@ static int ti_syscon_reset_assert(struct reset_controller_dev *rcdev,
> > mask = BIT(control->assert_bit);
> > value = (control->flags & ASSERT_SET) ? mask : 0x0;
> >
> > - return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
> > + if (data->update_force)
> > + return regmap_write_bits(data->regmap, control->assert_offset, mask, value);
> > + else
> > + return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
> > }
> >
> > /**
> > @@ -121,7 +125,10 @@ static int ti_syscon_reset_deassert(struct reset_controller_dev *rcdev,
> > mask = BIT(control->deassert_bit);
> > value = (control->flags & DEASSERT_SET) ? mask : 0x0;
> >
> > - return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
> > + if (data->update_force)
> > + return regmap_write_bits(data->regmap, control->deassert_offset, mask, value);
> > + else
> > + return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
> > }
> >
> > /**
> > @@ -223,6 +230,10 @@ static int ti_syscon_reset_probe(struct platform_device *pdev)
> > data->assert_deassert_together = true;
> > else
> > data->assert_deassert_together = false;
> > + if (of_property_read_bool(np, "update-force"))
> > + data->update_force = true;
> > + else
> > + data->update_force = false;
> >
> > data->rcdev.ops = &ti_syscon_reset_ops;
> > data->rcdev.owner = THIS_MODULE;
> > --
> > 2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Crystal Guo <crystal.guo@mediatek.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Suman Anna <s-anna@ti.com>, "Andrew F. Davis" <afd@ti.com>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
srv_heupstream <srv_heupstream@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Seiya Wang (王迺君)" <seiya.wang@mediatek.com>,
"Stanley Chu (朱原陞)" <stanley.chu@mediatek.com>,
"Yingjoe Chen (陳英洲)" <Yingjoe.Chen@mediatek.com>,
"Fan Chen (陳凡)" <fan.chen@mediatek.com>,
"Yong Liang (梁勇)" <Yong.Liang@mediatek.com>,
"Suman Anna" <s-anna@ti.com>, "Andrew F. Davis" <afd@ti.com>
Subject: Re: [v2,5/6] reset-controller: ti: Introduce force-update method
Date: Mon, 10 Aug 2020 14:57:36 +0800 [thread overview]
Message-ID: <1597042656.11360.39.camel@mhfsdcap03> (raw)
In-Reply-To: <3413ca889fcef11c6dafe1d6b135e1887d84a6e4.camel@pengutronix.de>
On Tue, 2020-08-04 at 15:03 +0800, Philipp Zabel wrote:
> Hi Crystal,
>
> On Mon, 2020-08-03 at 14:15 +0800, Crystal Guo wrote:
> > Introduce force-update method for assert and deassert interface,
> > which force the write operation in case the read already happens
> > to return the correct value.
> >
> > Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
>
> Added Suman and Andrew for confirmation: I think writing unconditionally
> can't break any existing user. Just changing to regmap_write_bits()
> instead of adding the update-force property as in v1 should be fine.
>
> regards
> Philipp
>
Hi Suman, Andrew,
Can you help to give some suggestions about this change.
Is this can be changed to write unconditionally, or should I add a
update-force property to force the write operation.
Best regards
Crystal.
> > ---
> > drivers/reset/reset-ti-syscon.c | 15 +++++++++++++--
> > 1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c
> > index 1c74bcb9a6c3..f4baf78afd14 100644
> > --- a/drivers/reset/reset-ti-syscon.c
> > +++ b/drivers/reset/reset-ti-syscon.c
> > @@ -57,6 +57,7 @@ struct ti_syscon_reset_data {
> > struct ti_syscon_reset_control *controls;
> > unsigned int nr_controls;
> > bool assert_deassert_together;
> > + bool update_force;
> > };
> >
> > #define to_ti_syscon_reset_data(rcdev) \
> > @@ -90,7 +91,10 @@ static int ti_syscon_reset_assert(struct reset_controller_dev *rcdev,
> > mask = BIT(control->assert_bit);
> > value = (control->flags & ASSERT_SET) ? mask : 0x0;
> >
> > - return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
> > + if (data->update_force)
> > + return regmap_write_bits(data->regmap, control->assert_offset, mask, value);
> > + else
> > + return regmap_update_bits(data->regmap, control->assert_offset, mask, value);
> > }
> >
> > /**
> > @@ -121,7 +125,10 @@ static int ti_syscon_reset_deassert(struct reset_controller_dev *rcdev,
> > mask = BIT(control->deassert_bit);
> > value = (control->flags & DEASSERT_SET) ? mask : 0x0;
> >
> > - return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
> > + if (data->update_force)
> > + return regmap_write_bits(data->regmap, control->deassert_offset, mask, value);
> > + else
> > + return regmap_update_bits(data->regmap, control->deassert_offset, mask, value);
> > }
> >
> > /**
> > @@ -223,6 +230,10 @@ static int ti_syscon_reset_probe(struct platform_device *pdev)
> > data->assert_deassert_together = true;
> > else
> > data->assert_deassert_together = false;
> > + if (of_property_read_bool(np, "update-force"))
> > + data->update_force = true;
> > + else
> > + data->update_force = false;
> >
> > data->rcdev.ops = &ti_syscon_reset_ops;
> > data->rcdev.owner = THIS_MODULE;
> > --
> > 2.18.0
next prev parent reply other threads:[~2020-08-10 7:01 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 6:15 [v2,0/6] introduce TI reset controller for MT8192 SoC Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` [v2, 1/6] dt-binding: reset-controller: ti: add assert-deassert-together property Crystal Guo
2020-08-03 6:15 ` [v2,1/6] " Crystal Guo
2020-08-03 6:15 ` [v2, 1/6] " Crystal Guo
2020-08-03 6:15 ` [v2,2/6] dt-binding: reset-controller: ti: add update-force property Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` [v2, 3/6] dt-binding: reset-controller: ti: add generic-reset to compatible Crystal Guo
2020-08-03 6:15 ` [v2,3/6] " Crystal Guo
2020-08-03 6:15 ` [v2, 3/6] " Crystal Guo
2020-08-04 8:15 ` [v2,3/6] " Philipp Zabel
2020-08-04 8:15 ` Philipp Zabel
2020-08-04 8:15 ` Philipp Zabel
2020-08-05 3:08 ` Yingjoe Chen
2020-08-05 3:08 ` Yingjoe Chen
2020-08-05 3:08 ` Yingjoe Chen
2020-08-03 6:15 ` [v2,4/6] reset-controller: ti: introduce a new reset handler Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-04 5:10 ` Stanley Chu
2020-08-04 5:10 ` Stanley Chu
2020-08-04 5:10 ` Stanley Chu
2020-08-04 7:16 ` Philipp Zabel
2020-08-04 7:16 ` Philipp Zabel
2020-08-04 7:16 ` Philipp Zabel
2020-08-03 6:15 ` [v2,5/6] reset-controller: ti: Introduce force-update method Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-04 4:15 ` Stanley Chu
2020-08-04 4:15 ` Stanley Chu
2020-08-04 4:15 ` Stanley Chu
2020-08-04 7:03 ` Philipp Zabel
2020-08-04 7:03 ` Philipp Zabel
2020-08-04 7:03 ` Philipp Zabel
2020-08-10 6:57 ` Crystal Guo [this message]
2020-08-10 6:57 ` Crystal Guo
2020-08-10 6:57 ` Crystal Guo
2020-09-02 23:05 ` Suman Anna
2020-09-02 23:05 ` Suman Anna
2020-09-02 23:05 ` Suman Anna
2020-08-05 3:14 ` Yingjoe Chen
2020-08-05 3:14 ` Yingjoe Chen
2020-08-05 3:14 ` Yingjoe Chen
2020-08-03 6:15 ` [v2,6/6] arm64: dts: mt8192: add infracfg_rst node Crystal Guo
2020-08-03 6:15 ` Crystal Guo
2020-08-03 6:15 ` Crystal Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1597042656.11360.39.camel@mhfsdcap03 \
--to=crystal.guo@mediatek.com \
--cc=Yingjoe.Chen@mediatek.com \
--cc=Yong.Liang@mediatek.com \
--cc=afd@ti.com \
--cc=fan.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=s-anna@ti.com \
--cc=seiya.wang@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.