Skip to contentSkip to conversation

units: Add the HZ macros

PATCH Applied Daniel Lezcano 7 participants 28 messages Feb 24, 2021 – Jul 15, 2021

Subsystems (12)

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/9 units: Add the HZ macros

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

---
 include/linux/units.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/units.h +4 -0
index dcc30a53fa93..218ec0d314b6 100644
@@ -4,6 +4,10 @@
 
 #include <linux/math.h>
 
+#define HZ_PER_KHZ		1000L
+#define KHZ_PER_MHZ		1000L
+#define HZ_PER_MHZ		1000000L
+
 #define MILLIWATT_PER_WATT	1000L
 #define MICROWATT_PER_MILLIWATT	1000L
 #define MICROWATT_PER_WATT	1000000L
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 2/9 thermal/drivers/devfreq_cooling: Use HZ macros

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/thermal/devfreq_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/devfreq_cooling.c +1 -1
index fed3121ff2a1..fa5b8b0c7604 100644
@@ -19,10 +19,10 @@
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/thermal.h>
+#include <linux/units.h>
 
 #include <trace/events/thermal.h>
 
-#define HZ_PER_KHZ		1000
 #define SCALE_ERROR_MITIGATION	100
 
 static DEFINE_IDA(devfreq_ida);
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 3/9 devfreq: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/devfreq/devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/devfreq.c +1 -1
index bf3047896e41..b6d63f02d293 100644
@@ -26,6 +26,7 @@
 #include <linux/hrtimer.h>
 #include <linux/of.h>
 #include <linux/pm_qos.h>
+#include <linux/units.h>
 #include "governor.h"
 
 #define CREATE_TRACE_POINTS
@@ -33,7 +34,6 @@
 
 #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name) ? true : false)
 #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ? true : false)
-#define HZ_PER_KHZ	1000
 
 static struct class *devfreq_class;
 static struct dentry *devfreq_debugfs;
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH v2 3/9] devfreq: Use HZ macros

Quoted 24 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
  drivers/devfreq/devfreq.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/devfreq.c +1 -0
index bf3047896e41..b6d63f02d293 100644
@@ -26,6 +26,7 @@
  #include <linux/hrtimer.h>
  #include <linux/of.h>
  #include <linux/pm_qos.h>
+#include <linux/units.h>
  #include "governor.h"
 
  #define CREATE_TRACE_POINTS

drivers/devfreq/devfreq.c line 39

Quoted 7 lines
drivers/devfreq/devfreq.c +0 -1
@@ -33,7 +34,6 @@
 
  #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name) ? true : false)
  #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ? true : false)
-#define HZ_PER_KHZ	1000
 
  static struct class *devfreq_class;
  static struct dentry *devfreq_debugfs;

I changed the patch title with 'PM /' prefix as following
in order to keep the consistent patch style if there are no any special objection.
- PM / devfreq: Use HZ macros

Applied it.

Thanks,
Chanwoo Choi

#4 lore raw

Re: [PATCH v2 3/9] devfreq: Use HZ macros

Quoted 39 lines · Chanwoo Choi
Quoted 23 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
  drivers/devfreq/devfreq.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/devfreq.c +1 -0
index bf3047896e41..b6d63f02d293 100644
@@ -26,6 +26,7 @@
   #include <linux/hrtimer.h>
   #include <linux/of.h>
   #include <linux/pm_qos.h>
+#include <linux/units.h>
   #include "governor.h"
     #define CREATE_TRACE_POINTS

drivers/devfreq/devfreq.c line 39

Quoted 7 lines
drivers/devfreq/devfreq.c +0 -1
@@ -33,7 +34,6 @@
     #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name)
 ? true : false)
   #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ?
 true : false)
-#define HZ_PER_KHZ    1000
     static struct class *devfreq_class;
   static struct dentry *devfreq_debugfs;

I changed the patch title with 'PM /' prefix as following
in order to keep the consistent patch style if there are no any special objection.
- PM / devfreq: Use HZ macros

Quoted 1 line

Applied it.

It should not compile. This patch and others depend on 1/9.

It would make sense to merge all of them through linux-pm.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#5 lore raw

Re: [PATCH v2 3/9] devfreq: Use HZ macros

Quoted 40 lines · Daniel Lezcano
Quoted 39 lines · Chanwoo Choi
Quoted 23 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
   drivers/devfreq/devfreq.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/devfreq.c +1 -0
index bf3047896e41..b6d63f02d293 100644
@@ -26,6 +26,7 @@
   #include <linux/hrtimer.h>
   #include <linux/of.h>
   #include <linux/pm_qos.h>
+#include <linux/units.h>
   #include "governor.h"
     #define CREATE_TRACE_POINTS

drivers/devfreq/devfreq.c line 39

Quoted 7 lines
drivers/devfreq/devfreq.c +0 -1
@@ -33,7 +34,6 @@
     #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name)
 ? true : false)
   #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ?
 true : false)
-#define HZ_PER_KHZ    1000
     static struct class *devfreq_class;
   static struct dentry *devfreq_debugfs;

I changed the patch title with 'PM /' prefix as following
in order to keep the consistent patch style if there are no any special objection.
- PM / devfreq: Use HZ macros

Quoted 5 lines
Quoted 1 line

Applied it.

It should not compile. This patch and others depend on 1/9.

It would make sense to merge all of them through linux-pm.

OK. I'm OK to apply it to linux-pm.

Thanks,
Chanwoo Choi

#6 lore raw

PATCH v2 4/9 iio/drivers/as73211: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/iio/light/as73211.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/light/as73211.c +1 -2
index 7b32dfaee9b3..3ba2378df3dd 100644
@@ -24,8 +24,7 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/pm.h>
-
-#define HZ_PER_KHZ 1000
+#include <linux/units.h>
 
 #define AS73211_DRV_NAME "as73211"
 
Signature · 1 line
2.17.1
maintainer Acked-by on v2 4/9
#7 lore raw

Re: [PATCH v2 4/9] iio/drivers/as73211: Use HZ macros

Quoted 5 lines · On Wed, 24 Feb 2021 15:42:14 +0100 Daniel Lezcano <[email protected]>…

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

Quoted 18 lines
---
 drivers/iio/light/as73211.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/light/as73211.c +1 -2
index 7b32dfaee9b3..3ba2378df3dd 100644
@@ -24,8 +24,7 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/pm.h>
-
-#define HZ_PER_KHZ 1000
+#include <linux/units.h>
 
 #define AS73211_DRV_NAME "as73211"
 
#8 lore raw

PATCH v2 5/9 hwmon/drivers/mr75203: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/hwmon/mr75203.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/mr75203.c +1 -1
index 18da5a25e89a..868243dba1ee 100644
@@ -17,6 +17,7 @@
 #include <linux/property.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
 /* PVT Common register */
 #define PVT_IP_CONFIG	0x04
@@ -37,7 +38,6 @@
 #define CLK_SYNTH_EN		BIT(24)
 #define CLK_SYS_CYCLES_MAX	514
 #define CLK_SYS_CYCLES_MIN	2
-#define HZ_PER_MHZ		1000000L
 
 #define SDIF_DISABLE	0x04
 
Signature · 1 line
2.17.1
maintainer Acked-by on v2 5/9
#9 lore raw

Re: [PATCH v2 5/9] hwmon/drivers/mr75203: Use HZ macros

Quoted 2 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

I assume the idea is to submit the series together, so

Guenter

Quoted 27 lines
---
 drivers/hwmon/mr75203.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/mr75203.c +1 -1
index 18da5a25e89a..868243dba1ee 100644
@@ -17,6 +17,7 @@
 #include <linux/property.h>
 #include <linux/regmap.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
 /* PVT Common register */
 #define PVT_IP_CONFIG	0x04
@@ -37,7 +38,6 @@
 #define CLK_SYNTH_EN		BIT(24)
 #define CLK_SYS_CYCLES_MAX	514
 #define CLK_SYS_CYCLES_MIN	2
-#define HZ_PER_MHZ		1000000L
 
 #define SDIF_DISABLE	0x04
 
#10 lore raw

PATCH v2 6/9 iio/drivers/hid-sensor: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1 -2
index 442ff787f7af..dda3b67e494f 100644
@@ -11,13 +11,12 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/time.h>
+#include <linux/units.h>
 
 #include <linux/hid-sensor-hub.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
-#define HZ_PER_MHZ	1000000L
-
 static struct {
 	u32 usage_id;
 	int unit; /* 0 for default others from HID sensor spec */
Signature · 1 line
2.17.1
maintainer Acked-by on v2 6/9
#11 lore raw

Re: [PATCH v2 6/9] iio/drivers/hid-sensor: Use HZ macros

Quoted 4 lines · On Wed, 24 Feb 2021 15:42:16 +0100 Daniel Lezcano <[email protected]>…

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

Quoted 23 lines
---
 drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +1 -2
index 442ff787f7af..dda3b67e494f 100644
@@ -11,13 +11,12 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/time.h>
+#include <linux/units.h>
 
 #include <linux/hid-sensor-hub.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
-#define HZ_PER_MHZ	1000000L
-
 static struct {
 	u32 usage_id;
 	int unit; /* 0 for default others from HID sensor spec */
#12 lore raw

PATCH v2 7/9 i2c/drivers/ov02q10: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/media/i2c/ov02a10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov02a10.c +1 -1
index 8683ffd3287a..59a34e59774e 100644
@@ -9,6 +9,7 @@
 #include <linux/module.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
+#include <linux/units.h>
 #include <media/media-entity.h>
 #include <media/v4l2-async.h>
 #include <media/v4l2-ctrls.h>
@@ -64,7 +65,6 @@
 /* Test pattern control */
 #define OV02A10_REG_TEST_PATTERN			0xb6
 
-#define HZ_PER_MHZ					1000000L
 #define OV02A10_LINK_FREQ_390MHZ			(390 * HZ_PER_MHZ)
 #define OV02A10_ECLK_FREQ				(24 * HZ_PER_MHZ)
 
Signature · 1 line
2.17.1
#13 lore raw

PATCH v2 8/9 mtd/drivers/nand: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/mtd/nand/raw/intel-nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/intel-nand-controller.c +1 -1
index a304fda5d1fa..8d00191a4815 100644
@@ -20,6 +20,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/types.h>
+#include <linux/units.h>
 #include <asm/unaligned.h>
 
 #define EBU_CLC			0x000
@@ -102,7 +103,6 @@
 
 #define MAX_CS	2
 
-#define HZ_PER_MHZ	1000000L
 #define USEC_PER_SEC	1000000L
 
 struct ebu_nand_cs {
Signature · 6 lines
2.17.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
#15 lore raw

Re: [PATCH v2 8/9] mtd/drivers/nand: Use HZ macros

Quoted 7 lines · Miquel Raynal
Quoted 4 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Actually, I was expecting to have it merged through linux-pm as this patch depends on 1/9

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
maintainer Acked-by
#16 lore raw

Re: [PATCH v2 8/9] mtd/drivers/nand: Use HZ macros

Hi Daniel,

Daniel Lezcano <[email protected]> wrote on Tue, 2 Mar 2021 18:03:12 +0100:

Quoted 5 lines · Miquel Raynal
Quoted 4 lines · Daniel Lezcano
Quoted 3 lines

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Actually, I was expecting to have it merged through linux-pm as this patch depends on 1/9

No problem, I just removed it from my tree. However in this case please fix the subject prefix to "mtd: rawnand: intel:". With this nit fixed,

Thanks,
Miquèl

#17 lore raw

PATCH v2 9/9 phy/drivers/stm32: Use HZ macros

In reply to Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/st/phy-stm32-usbphyc.c +1 -1
index a54317e96c41..02dd12bb4692 100644
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
 #define STM32_USBPHYC_PLL	0x0
 #define STM32_USBPHYC_MISC	0x8
@@ -48,7 +49,6 @@ static const char * const supplies_names[] = {
 #define PLL_FVCO_MHZ		2880
 #define PLL_INFF_MIN_RATE_HZ	19200000
 #define PLL_INFF_MAX_RATE_HZ	38400000
-#define HZ_PER_MHZ		1000000L
 
 struct pll_params {
 	u8 ndiv;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#18 lore raw

Re: [PATCH v2 9/9] phy/drivers/stm32: Use HZ macros

Quoted 21 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/st/phy-stm32-usbphyc.c +1 -0
index a54317e96c41..02dd12bb4692 100644
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
 #define STM32_USBPHYC_PLL	0x0
 #define STM32_USBPHYC_MISC	0x8

drivers/phy/st/phy-stm32-usbphyc.c static const char * const supplies_names[] = { · line 51

Quoted 4 lines
drivers/phy/st/phy-stm32-usbphyc.c +0 -1
@@ -48,7 +49,6 @@ static const char * const supplies_names[] = {
 #define PLL_FVCO_MHZ		2880
 #define PLL_INFF_MIN_RATE_HZ	19200000
 #define PLL_INFF_MAX_RATE_HZ	38400000
-#define HZ_PER_MHZ		1000000L

I dont see this in units.h, can you send this once it is merged upstream

Signature · 1 line
~Vinod
#19 lore raw

Re: [PATCH v2 9/9] phy/drivers/stm32: Use HZ macros

Quoted 19 lines · Vinod Koul
Quoted 18 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/st/phy-stm32-usbphyc.c +1 -0
index a54317e96c41..02dd12bb4692 100644
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
Quoted 9 lines

drivers/phy/st/phy-stm32-usbphyc.c static const char * const supplies_names[] = { · line 51

Quoted 7 lines
drivers/phy/st/phy-stm32-usbphyc.c +0 -1
 #define STM32_USBPHYC_PLL	0x0
 #define STM32_USBPHYC_MISC	0x8
@@ -48,7 +49,6 @@ static const char * const supplies_names[] = {
 #define PLL_FVCO_MHZ		2880
 #define PLL_INFF_MIN_RATE_HZ	19200000
 #define PLL_INFF_MAX_RATE_HZ	38400000
-#define HZ_PER_MHZ		1000000L

I dont see this in units.h, can you send this once it is merged upstream

Actually, it is the first patch of the series.

I asked Rafael if he can merge the entire series.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
maintainer
#20 lore raw

Re: [PATCH v2 9/9] phy/drivers/stm32: Use HZ macros

Quoted 30 lines · Daniel Lezcano
Quoted 19 lines · Vinod Koul
Quoted 18 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/st/phy-stm32-usbphyc.c +1 -0
index a54317e96c41..02dd12bb4692 100644
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
Quoted 9 lines

drivers/phy/st/phy-stm32-usbphyc.c static const char * const supplies_names[] = { · line 51

Quoted 7 lines
drivers/phy/st/phy-stm32-usbphyc.c +0 -1
 #define STM32_USBPHYC_PLL	0x0
 #define STM32_USBPHYC_MISC	0x8
@@ -48,7 +49,6 @@ static const char * const supplies_names[] = {
 #define PLL_FVCO_MHZ		2880
 #define PLL_INFF_MIN_RATE_HZ	19200000
 #define PLL_INFF_MAX_RATE_HZ	38400000
-#define HZ_PER_MHZ		1000000L

I dont see this in units.h, can you send this once it is merged upstream

Quoted 3 lines

Actually, it is the first patch of the series.

I asked Rafael if he can merge the entire series.

Pls cc folks on cover at least so that they are aware.

Thanks

Signature · 1 line
~Vinod
#21 lore raw

Re: [PATCH v2 9/9] phy/drivers/stm32: Use HZ macros

Quoted 31 lines · Vinod Koul
Quoted 30 lines · Daniel Lezcano
Quoted 28 lines · Vinod Koul
Quoted 21 lines · Daniel Lezcano

HZ unit conversion macros are available in units.h, use them and remove the duplicate definition.

---
 drivers/phy/st/phy-stm32-usbphyc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/st/phy-stm32-usbphyc.c +1 -0
index a54317e96c41..02dd12bb4692 100644
@@ -14,6 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/phy/phy.h>
 #include <linux/reset.h>
+#include <linux/units.h>
 
 #define STM32_USBPHYC_PLL	0x0
 #define STM32_USBPHYC_MISC	0x8

drivers/phy/st/phy-stm32-usbphyc.c static const char * const supplies_names[] = { · line 51

Quoted 4 lines
drivers/phy/st/phy-stm32-usbphyc.c +0 -1
@@ -48,7 +49,6 @@ static const char * const supplies_names[] = {
 #define PLL_FVCO_MHZ		2880
 #define PLL_INFF_MIN_RATE_HZ	19200000
 #define PLL_INFF_MAX_RATE_HZ	38400000
-#define HZ_PER_MHZ		1000000L

I dont see this in units.h, can you send this once it is merged upstream

Quoted 5 lines
Quoted 3 lines

Actually, it is the first patch of the series.

I asked Rafael if he can merge the entire series.

Pls cc folks on cover at least so that they are aware.

Yeah, sorry for that. I tend to rely too much on the default 'cccmd'.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#22 lore raw
In reply to Daniel Lezcano
Quoted 9 lines · Daniel Lezcano

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

---

Is it possible to have these patches merged through the linux-pm tree ?

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Reviewed-by on v2 1/9
#23 lore raw
In reply to Daniel Lezcano
Quoted 4 lines · Daniel Lezcano

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

For the all that have not been tagged:

Thanks!

Quoted 25 lines
---
 include/linux/units.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/units.h +4 -0
index dcc30a53fa93..218ec0d314b6 100644
@@ -4,6 +4,10 @@
 
 #include <linux/math.h>
 
+#define HZ_PER_KHZ		1000L
+#define KHZ_PER_MHZ		1000L
+#define HZ_PER_MHZ		1000000L
+
 #define MILLIWATT_PER_WATT	1000L
 #define MICROWATT_PER_MILLIWATT	1000L
 #define MICROWATT_PER_WATT	1000000L
Signature · 1 line
2.17.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#24 lore raw

Hi Rafael,

is it possible to merge this series through linux-pm ?

Quoted 37 lines · Andy Shevchenko
Quoted 4 lines · Daniel Lezcano

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

For the all that have not been tagged:

Thanks!

Quoted 25 lines
---
 include/linux/units.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/units.h +4 -0
index dcc30a53fa93..218ec0d314b6 100644
@@ -4,6 +4,10 @@
 
 #include <linux/math.h>
 
+#define HZ_PER_KHZ		1000L
+#define KHZ_PER_MHZ		1000L
+#define HZ_PER_MHZ		1000000L
+
 #define MILLIWATT_PER_WATT	1000L
 #define MICROWATT_PER_MILLIWATT	1000L
 #define MICROWATT_PER_WATT	1000000L
Signature · 1 line
2.17.1
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#25 lore raw
In reply to Daniel Lezcano
Quoted 4 lines · Daniel Lezcano

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

Hmm... I think you need to rebase, add cover letter and resend.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#26 lore raw
In reply to Daniel Lezcano
Quoted 4 lines · Daniel Lezcano

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

Any progress on this? Are you planning to resubmit?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#27 lore raw
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Daniel Lezcano

The macros for the unit conversion for frequency are duplicated in different places.

Provide these macros in the 'units' header, so they can be reused.

Any progress on this? Are you planning to resubmit?

Yes, I'll resubmit a new series.

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog