diff mbox series

[v3,25/47] mfd: ti_am335x_tscadc: Use the new HZ_PER_MHZ macro

Message ID 20210915155908.476767-26-miquel.raynal@bootlin.com (mailing list archive)
State New, archived
Headers show
Series TI AM437X ADC1 | expand

Commit Message

Miquel Raynal Sept. 15, 2021, 3:58 p.m. UTC
Before adding another frequency with even more zeroes, use the
HZ_PER_MHZ macro to clarify the number.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 include/linux/mfd/ti_am335x_tscadc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jonathan Cameron Sept. 18, 2021, 4:02 p.m. UTC | #1
On Wed, 15 Sep 2021 17:58:46 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Before adding another frequency with even more zeroes, use the
> HZ_PER_MHZ macro to clarify the number.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Great.
FWIW
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  include/linux/mfd/ti_am335x_tscadc.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
> index efafecfc87a7..d98ec8937dd9 100644
> --- a/include/linux/mfd/ti_am335x_tscadc.h
> +++ b/include/linux/mfd/ti_am335x_tscadc.h
> @@ -9,6 +9,7 @@
>  #define __LINUX_TI_AM335X_TSCADC_MFD_H
>  
>  #include <linux/mfd/core.h>
> +#include <linux/units.h>
>  
>  #define REG_RAWIRQSTATUS	0x024
>  #define REG_IRQSTATUS		0x028
> @@ -133,7 +134,7 @@
>  #define SEQ_STATUS		BIT(5)
>  #define CHARGE_STEP		0x11
>  
> -#define ADC_CLK			3000000
> +#define ADC_CLK			(3 * HZ_PER_MHZ)
>  #define TOTAL_STEPS		16
>  #define TOTAL_CHANNELS		8
>  #define FIFO1_THRESHOLD		19
diff mbox series

Patch

diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index efafecfc87a7..d98ec8937dd9 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -9,6 +9,7 @@ 
 #define __LINUX_TI_AM335X_TSCADC_MFD_H
 
 #include <linux/mfd/core.h>
+#include <linux/units.h>
 
 #define REG_RAWIRQSTATUS	0x024
 #define REG_IRQSTATUS		0x028
@@ -133,7 +134,7 @@ 
 #define SEQ_STATUS		BIT(5)
 #define CHARGE_STEP		0x11
 
-#define ADC_CLK			3000000
+#define ADC_CLK			(3 * HZ_PER_MHZ)
 #define TOTAL_STEPS		16
 #define TOTAL_CHANNELS		8
 #define FIFO1_THRESHOLD		19