* [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
@ 2016-08-02 8:52 Marek Szyprowski
2016-08-02 9:07 ` Sylwester Nawrocki
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Marek Szyprowski @ 2016-08-02 8:52 UTC (permalink / raw)
To: linux-kernel, linux-samsung-soc
Cc: Marek Szyprowski, Sylwester Nawrocki, Kishon Vijay Abraham I,
Krzysztof Kozlowski
There is no need to access regmap of coupled phy to check its state - such
information is already in the phy device itself, so use it directly. This
let us to avoid possible access to registers of the device in the disabled
power domain if the coupled phy is already disabled.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/phy/phy-exynos-mipi-video.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers/phy/phy-exynos-mipi-video.c
index 8b851f7..e185234 100644
--- a/drivers/phy/phy-exynos-mipi-video.c
+++ b/drivers/phy/phy-exynos-mipi-video.c
@@ -229,19 +229,6 @@ struct exynos_mipi_video_phy {
spinlock_t slock;
};
-static inline int __is_running(const struct exynos_mipi_phy_desc *data,
- struct exynos_mipi_video_phy *state)
-{
- u32 val;
- int ret;
-
- ret = regmap_read(state->regmaps[data->resetn_map], data->resetn_reg, &val);
- if (ret)
- return 0;
-
- return val & data->resetn_val;
-}
-
static int __set_phy_state(const struct exynos_mipi_phy_desc *data,
struct exynos_mipi_video_phy *state, unsigned int on)
{
@@ -251,7 +238,7 @@ static int __set_phy_state(const struct exynos_mipi_phy_desc *data,
/* disable in PMU sysreg */
if (!on && data->coupled_phy_id >= 0 &&
- !__is_running(state->phys[data->coupled_phy_id].data, state)) {
+ state->phys[data->coupled_id].phy->power_count == 0) {
regmap_read(state->regmaps[data->enable_map], data->enable_reg,
&val);
val &= ~data->enable_val;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
2016-08-02 8:52 [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status Marek Szyprowski
@ 2016-08-02 9:07 ` Sylwester Nawrocki
2016-08-02 9:30 ` kbuild test robot
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Sylwester Nawrocki @ 2016-08-02 9:07 UTC (permalink / raw)
To: linux-kernel, linux-samsung-soc
Cc: Marek Szyprowski, Kishon Vijay Abraham I, Krzysztof Kozlowski
On 08/02/2016 10:52 AM, Marek Szyprowski wrote:
> There is no need to access regmap of coupled phy to check its state - such
> information is already in the phy device itself, so use it directly. This
> let us to avoid possible access to registers of the device in the disabled
> power domain if the coupled phy is already disabled.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
2016-08-02 8:52 [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status Marek Szyprowski
@ 2016-08-02 9:30 ` kbuild test robot
2016-08-02 9:30 ` kbuild test robot
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2016-08-02 9:30 UTC (permalink / raw)
To: Marek Szyprowski
Cc: kbuild-all, linux-kernel, linux-samsung-soc, Marek Szyprowski,
Sylwester Nawrocki, Kishon Vijay Abraham I, Krzysztof Kozlowski
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]
Hi Marek,
[auto build test ERROR on phy/next]
[also build test ERROR on v4.7 next-20160802]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Marek-Szyprowski/phy-exynos-mipi-video-simplify-check-for-coupled-phy-status/20160802-170240
base: https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/phy/phy-exynos-mipi-video.c: In function '__set_phy_state':
>> drivers/phy/phy-exynos-mipi-video.c:241:22: error: 'const struct exynos_mipi_phy_desc' has no member named 'coupled_id'
state->phys[data->coupled_id].phy->power_count == 0) {
^
vim +241 drivers/phy/phy-exynos-mipi-video.c
235 u32 val;
236
237 spin_lock(&state->slock);
238
239 /* disable in PMU sysreg */
240 if (!on && data->coupled_phy_id >= 0 &&
> 241 state->phys[data->coupled_id].phy->power_count == 0) {
242 regmap_read(state->regmaps[data->enable_map], data->enable_reg,
243 &val);
244 val &= ~data->enable_val;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46457 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
@ 2016-08-02 9:30 ` kbuild test robot
0 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2016-08-02 9:30 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, linux-samsung-soc, Marek Szyprowski,
Sylwester Nawrocki, Kishon Vijay Abraham I, Krzysztof Kozlowski
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]
Hi Marek,
[auto build test ERROR on phy/next]
[also build test ERROR on v4.7 next-20160802]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Marek-Szyprowski/phy-exynos-mipi-video-simplify-check-for-coupled-phy-status/20160802-170240
base: https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/phy/phy-exynos-mipi-video.c: In function '__set_phy_state':
>> drivers/phy/phy-exynos-mipi-video.c:241:22: error: 'const struct exynos_mipi_phy_desc' has no member named 'coupled_id'
state->phys[data->coupled_id].phy->power_count == 0) {
^
vim +241 drivers/phy/phy-exynos-mipi-video.c
235 u32 val;
236
237 spin_lock(&state->slock);
238
239 /* disable in PMU sysreg */
240 if (!on && data->coupled_phy_id >= 0 &&
> 241 state->phys[data->coupled_id].phy->power_count == 0) {
242 regmap_read(state->regmaps[data->enable_map], data->enable_reg,
243 &val);
244 val &= ~data->enable_val;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46457 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
2016-08-02 8:52 [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status Marek Szyprowski
@ 2016-08-02 9:31 ` kbuild test robot
2016-08-02 9:30 ` kbuild test robot
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2016-08-02 9:31 UTC (permalink / raw)
To: Marek Szyprowski
Cc: kbuild-all, linux-kernel, linux-samsung-soc, Marek Szyprowski,
Sylwester Nawrocki, Kishon Vijay Abraham I, Krzysztof Kozlowski
[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]
Hi Marek,
[auto build test ERROR on phy/next]
[also build test ERROR on v4.7 next-20160802]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Marek-Szyprowski/phy-exynos-mipi-video-simplify-check-for-coupled-phy-status/20160802-170240
base: https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/phy/phy-exynos-mipi-video.c: In function '__set_phy_state':
>> drivers/phy/phy-exynos-mipi-video.c:241:22: error: 'const struct exynos_mipi_phy_desc' has no member named 'coupled_id'; did you mean 'coupled_phy_id'?
state->phys[data->coupled_id].phy->power_count == 0) {
^~
vim +241 drivers/phy/phy-exynos-mipi-video.c
235 u32 val;
236
237 spin_lock(&state->slock);
238
239 /* disable in PMU sysreg */
240 if (!on && data->coupled_phy_id >= 0 &&
> 241 state->phys[data->coupled_id].phy->power_count == 0) {
242 regmap_read(state->regmaps[data->enable_map], data->enable_reg,
243 &val);
244 val &= ~data->enable_val;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 53971 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
@ 2016-08-02 9:31 ` kbuild test robot
0 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2016-08-02 9:31 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, linux-samsung-soc, Marek Szyprowski,
Sylwester Nawrocki, Kishon Vijay Abraham I, Krzysztof Kozlowski
[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]
Hi Marek,
[auto build test ERROR on phy/next]
[also build test ERROR on v4.7 next-20160802]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Marek-Szyprowski/phy-exynos-mipi-video-simplify-check-for-coupled-phy-status/20160802-170240
base: https://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/phy/phy-exynos-mipi-video.c: In function '__set_phy_state':
>> drivers/phy/phy-exynos-mipi-video.c:241:22: error: 'const struct exynos_mipi_phy_desc' has no member named 'coupled_id'; did you mean 'coupled_phy_id'?
state->phys[data->coupled_id].phy->power_count == 0) {
^~
vim +241 drivers/phy/phy-exynos-mipi-video.c
235 u32 val;
236
237 spin_lock(&state->slock);
238
239 /* disable in PMU sysreg */
240 if (!on && data->coupled_phy_id >= 0 &&
> 241 state->phys[data->coupled_id].phy->power_count == 0) {
242 regmap_read(state->regmaps[data->enable_map], data->enable_reg,
243 &val);
244 val &= ~data->enable_val;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 53971 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status
2016-08-02 8:52 [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status Marek Szyprowski
` (2 preceding siblings ...)
2016-08-02 9:31 ` kbuild test robot
@ 2016-08-02 10:17 ` Marek Szyprowski
3 siblings, 0 replies; 7+ messages in thread
From: Marek Szyprowski @ 2016-08-02 10:17 UTC (permalink / raw)
To: linux-kernel, linux-samsung-soc
Cc: Marek Szyprowski, Sylwester Nawrocki, Kishon Vijay Abraham I,
Krzysztof Kozlowski
There is no need to access regmap of coupled phy to check its state - such
information is already in the phy device itself, so use it directly. This
let us to avoid possible access to registers of the device in the disabled
power domain if the coupled phy is already disabled.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
drivers/phy/phy-exynos-mipi-video.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers/phy/phy-exynos-mipi-video.c
index 8b851f7..6bee04c 100644
--- a/drivers/phy/phy-exynos-mipi-video.c
+++ b/drivers/phy/phy-exynos-mipi-video.c
@@ -229,19 +229,6 @@ struct exynos_mipi_video_phy {
spinlock_t slock;
};
-static inline int __is_running(const struct exynos_mipi_phy_desc *data,
- struct exynos_mipi_video_phy *state)
-{
- u32 val;
- int ret;
-
- ret = regmap_read(state->regmaps[data->resetn_map], data->resetn_reg, &val);
- if (ret)
- return 0;
-
- return val & data->resetn_val;
-}
-
static int __set_phy_state(const struct exynos_mipi_phy_desc *data,
struct exynos_mipi_video_phy *state, unsigned int on)
{
@@ -251,7 +238,7 @@ static int __set_phy_state(const struct exynos_mipi_phy_desc *data,
/* disable in PMU sysreg */
if (!on && data->coupled_phy_id >= 0 &&
- !__is_running(state->phys[data->coupled_phy_id].data, state)) {
+ state->phys[data->coupled_phy_id].phy->power_count == 0) {
regmap_read(state->regmaps[data->enable_map], data->enable_reg,
&val);
val &= ~data->enable_val;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-08-02 10:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 8:52 [PATCH] phy: exynos-mipi-video: simplify check for coupled phy status Marek Szyprowski
2016-08-02 9:07 ` Sylwester Nawrocki
2016-08-02 9:30 ` kbuild test robot
2016-08-02 9:30 ` kbuild test robot
2016-08-02 9:31 ` kbuild test robot
2016-08-02 9:31 ` kbuild test robot
2016-08-02 10:17 ` Marek Szyprowski
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.