* [PATCH 0/3] mfd: menelaus: couple simple cleanups @ 2015-03-28 20:45 Aaro Koskinen 2015-03-28 20:45 ` [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus Aaro Koskinen ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Aaro Koskinen @ 2015-03-28 20:45 UTC (permalink / raw) To: Samuel Ortiz, Lee Jones Cc: linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi, Aaro Koskinen Hi, I came across these while trying to start DT conversion for menelaus (http://marc.info/?t=141970287300005&r=1&w=2). While the DT work failed and is still pending, I think it's still worth to apply these as they are independent and they remove some cruft from the tree. A. Aaro Koskinen (3): mfd: menelaus: delete omap_has_menelaus mfd: menelaus: drop support for SW controller VCORE mfd: menelaus: use macro for magic number drivers/mfd/menelaus.c | 25 +------------------------ include/linux/mfd/menelaus.h | 7 ------- 2 files changed, 1 insertion(+), 31 deletions(-) -- 2.2.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus 2015-03-28 20:45 [PATCH 0/3] mfd: menelaus: couple simple cleanups Aaro Koskinen @ 2015-03-28 20:45 ` Aaro Koskinen 2015-03-30 7:14 ` Lee Jones 2015-03-28 20:45 ` [PATCH 2/3] mfd: menelaus: drop support for SW controller VCORE Aaro Koskinen 2015-03-28 20:45 ` [PATCH 3/3] mfd: menelaus: use macro for magic number Aaro Koskinen 2 siblings, 1 reply; 7+ messages in thread From: Aaro Koskinen @ 2015-03-28 20:45 UTC (permalink / raw) To: Samuel Ortiz, Lee Jones Cc: linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi, Aaro Koskinen Delete unused macro. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> --- include/linux/mfd/menelaus.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h index f097e89..a1e12bf3 100644 --- a/include/linux/mfd/menelaus.h +++ b/include/linux/mfd/menelaus.h @@ -38,10 +38,4 @@ extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); extern int menelaus_set_regulator_sleep(int enable, u32 val); -#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_MENELAUS) -#define omap_has_menelaus() 1 -#else -#define omap_has_menelaus() 0 -#endif - #endif -- 2.2.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus 2015-03-28 20:45 ` [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus Aaro Koskinen @ 2015-03-30 7:14 ` Lee Jones 0 siblings, 0 replies; 7+ messages in thread From: Lee Jones @ 2015-03-30 7:14 UTC (permalink / raw) To: Aaro Koskinen Cc: Samuel Ortiz, linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi On Sat, 28 Mar 2015, Aaro Koskinen wrote: > Delete unused macro. > > Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> > --- > include/linux/mfd/menelaus.h | 6 ------ > 1 file changed, 6 deletions(-) Applied, thanks. > diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h > index f097e89..a1e12bf3 100644 > --- a/include/linux/mfd/menelaus.h > +++ b/include/linux/mfd/menelaus.h > @@ -38,10 +38,4 @@ extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); > > extern int menelaus_set_regulator_sleep(int enable, u32 val); > > -#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_MENELAUS) > -#define omap_has_menelaus() 1 > -#else > -#define omap_has_menelaus() 0 > -#endif > - > #endif -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] mfd: menelaus: drop support for SW controller VCORE 2015-03-28 20:45 [PATCH 0/3] mfd: menelaus: couple simple cleanups Aaro Koskinen 2015-03-28 20:45 ` [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus Aaro Koskinen @ 2015-03-28 20:45 ` Aaro Koskinen 2015-03-30 7:15 ` Lee Jones 2015-03-28 20:45 ` [PATCH 3/3] mfd: menelaus: use macro for magic number Aaro Koskinen 2 siblings, 1 reply; 7+ messages in thread From: Aaro Koskinen @ 2015-03-28 20:45 UTC (permalink / raw) To: Samuel Ortiz, Lee Jones Cc: linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi, Aaro Koskinen Drop support for SW controlled VCORE, nobody uses it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> --- drivers/mfd/menelaus.c | 23 ----------------------- include/linux/mfd/menelaus.h | 1 - 2 files changed, 24 deletions(-) diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 9f01aef..917fa86 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c @@ -532,29 +532,6 @@ static const struct menelaus_vtg_value vcore_values[] = { { 1450, 18 }, }; -int menelaus_set_vcore_sw(unsigned int mV) -{ - int val, ret; - struct i2c_client *c = the_menelaus->client; - - val = menelaus_get_vtg_value(mV, vcore_values, - ARRAY_SIZE(vcore_values)); - if (val < 0) - return -EINVAL; - - dev_dbg(&c->dev, "Setting VCORE to %d mV (val 0x%02x)\n", mV, val); - - /* Set SW mode and the voltage in one go. */ - mutex_lock(&the_menelaus->lock); - ret = menelaus_write_reg(MENELAUS_VCORE_CTRL1, val); - if (ret == 0) - the_menelaus->vcore_hw_mode = 0; - mutex_unlock(&the_menelaus->lock); - msleep(1); - - return ret; -} - int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV) { int fval, rval, val, ret; diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h index a1e12bf3..9e85ac0 100644 --- a/include/linux/mfd/menelaus.h +++ b/include/linux/mfd/menelaus.h @@ -24,7 +24,6 @@ extern int menelaus_set_vaux(unsigned int mV); extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); extern int menelaus_set_slot_sel(int enable); extern int menelaus_get_slot_pin_states(void); -extern int menelaus_set_vcore_sw(unsigned int mV); extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); #define EN_VPLL_SLEEP (1 << 7) -- 2.2.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] mfd: menelaus: drop support for SW controller VCORE 2015-03-28 20:45 ` [PATCH 2/3] mfd: menelaus: drop support for SW controller VCORE Aaro Koskinen @ 2015-03-30 7:15 ` Lee Jones 0 siblings, 0 replies; 7+ messages in thread From: Lee Jones @ 2015-03-30 7:15 UTC (permalink / raw) To: Aaro Koskinen Cc: Samuel Ortiz, linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi On Sat, 28 Mar 2015, Aaro Koskinen wrote: > Drop support for SW controlled VCORE, nobody uses it. > > Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> > --- > drivers/mfd/menelaus.c | 23 ----------------------- > include/linux/mfd/menelaus.h | 1 - > 2 files changed, 24 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c > index 9f01aef..917fa86 100644 > --- a/drivers/mfd/menelaus.c > +++ b/drivers/mfd/menelaus.c > @@ -532,29 +532,6 @@ static const struct menelaus_vtg_value vcore_values[] = { > { 1450, 18 }, > }; > > -int menelaus_set_vcore_sw(unsigned int mV) > -{ > - int val, ret; > - struct i2c_client *c = the_menelaus->client; > - > - val = menelaus_get_vtg_value(mV, vcore_values, > - ARRAY_SIZE(vcore_values)); > - if (val < 0) > - return -EINVAL; > - > - dev_dbg(&c->dev, "Setting VCORE to %d mV (val 0x%02x)\n", mV, val); > - > - /* Set SW mode and the voltage in one go. */ > - mutex_lock(&the_menelaus->lock); > - ret = menelaus_write_reg(MENELAUS_VCORE_CTRL1, val); > - if (ret == 0) > - the_menelaus->vcore_hw_mode = 0; > - mutex_unlock(&the_menelaus->lock); > - msleep(1); > - > - return ret; > -} > - > int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV) > { > int fval, rval, val, ret; > diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h > index a1e12bf3..9e85ac0 100644 > --- a/include/linux/mfd/menelaus.h > +++ b/include/linux/mfd/menelaus.h > @@ -24,7 +24,6 @@ extern int menelaus_set_vaux(unsigned int mV); > extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); > extern int menelaus_set_slot_sel(int enable); > extern int menelaus_get_slot_pin_states(void); > -extern int menelaus_set_vcore_sw(unsigned int mV); > extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV); > > #define EN_VPLL_SLEEP (1 << 7) -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] mfd: menelaus: use macro for magic number 2015-03-28 20:45 [PATCH 0/3] mfd: menelaus: couple simple cleanups Aaro Koskinen 2015-03-28 20:45 ` [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus Aaro Koskinen 2015-03-28 20:45 ` [PATCH 2/3] mfd: menelaus: drop support for SW controller VCORE Aaro Koskinen @ 2015-03-28 20:45 ` Aaro Koskinen 2015-03-30 7:15 ` Lee Jones 2 siblings, 1 reply; 7+ messages in thread From: Aaro Koskinen @ 2015-03-28 20:45 UTC (permalink / raw) To: Samuel Ortiz, Lee Jones Cc: linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi, Aaro Koskinen Use macro to check a register bit. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> --- drivers/mfd/menelaus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 917fa86..c2ca665 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c @@ -1216,7 +1216,7 @@ static int menelaus_probe(struct i2c_client *client, err = menelaus_read_reg(MENELAUS_VCORE_CTRL1); if (err < 0) goto fail; - if (err & BIT(7)) + if (err & VCORE_CTRL1_HW_NSW) menelaus->vcore_hw_mode = 1; else menelaus->vcore_hw_mode = 0; -- 2.2.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] mfd: menelaus: use macro for magic number 2015-03-28 20:45 ` [PATCH 3/3] mfd: menelaus: use macro for magic number Aaro Koskinen @ 2015-03-30 7:15 ` Lee Jones 0 siblings, 0 replies; 7+ messages in thread From: Lee Jones @ 2015-03-30 7:15 UTC (permalink / raw) To: Aaro Koskinen Cc: Samuel Ortiz, linux-omap, linux-kernel, Tony Lindgren, Felipe Balbi On Sat, 28 Mar 2015, Aaro Koskinen wrote: > Use macro to check a register bit. > > Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> > --- > drivers/mfd/menelaus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. > diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c > index 917fa86..c2ca665 100644 > --- a/drivers/mfd/menelaus.c > +++ b/drivers/mfd/menelaus.c > @@ -1216,7 +1216,7 @@ static int menelaus_probe(struct i2c_client *client, > err = menelaus_read_reg(MENELAUS_VCORE_CTRL1); > if (err < 0) > goto fail; > - if (err & BIT(7)) > + if (err & VCORE_CTRL1_HW_NSW) > menelaus->vcore_hw_mode = 1; > else > menelaus->vcore_hw_mode = 0; -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-30 7:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-03-28 20:45 [PATCH 0/3] mfd: menelaus: couple simple cleanups Aaro Koskinen 2015-03-28 20:45 ` [PATCH 1/3] mfd: menelaus: delete omap_has_menelaus Aaro Koskinen 2015-03-30 7:14 ` Lee Jones 2015-03-28 20:45 ` [PATCH 2/3] mfd: menelaus: drop support for SW controller VCORE Aaro Koskinen 2015-03-30 7:15 ` Lee Jones 2015-03-28 20:45 ` [PATCH 3/3] mfd: menelaus: use macro for magic number Aaro Koskinen 2015-03-30 7:15 ` Lee Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).