[linux-sunxi] [PATCH v4 4/9] pwm: sunxi: Customizable control and period register position.

2017-02-23 Thread lis8215
From: Siarhei Volkau sun6i has same registers as sun4i compatible chips, but its position in register map are different. This patch make register's position selectable for support sun6i in next patches. Signed-off-by: Siarhei Volkau ---

[linux-sunxi] [PATCH v4 5/9] pwm: sunxi: Customizable regmap fields and enable bit mask.

2017-02-23 Thread lis8215
From: Siarhei Volkau sun6i has similar control registers bit map in comparison to sun4i channel 0, but each channel has its own control register. This patch make: - regmap fields declarations selectable, - enable/disable bitmask selectable. These things needed for support

[linux-sunxi] [PATCH v4 2/9] pwm: sunxi: Use regmap fields for bit operations.

2017-02-23 Thread lis8215
From: Siarhei Volkau This patch replaces a bunch of custom read-modify-write operations by regmap fields. Signed-off-by: Siarhei Volkau --- drivers/pwm/pwm-sun4i.c | 197 ++-- 1 file changed, 108 insertions(+),

[linux-sunxi] [PATCH v4 0/9] Add the Allwinner A31/A31s PWM driver.

2017-02-23 Thread lis8215
From: Siarhei Volkau This is the 4-th version of the sun6i PWM patchset. Difference between v3 and v4: - patchset split on many small patches for easier bisect. - avoid unsafe macros usage. - some minor cleanups. First two patches moves register access operations from

[linux-sunxi] [PATCH v4 8/9] pwm: sunxi: Code cleanup.

2017-02-23 Thread lis8215
From: Siarhei Volkau This patch removes macros, which are not use anymore and fixes two extra -Wsign-compare warnings. Signed-off-by: Siarhei Volkau --- drivers/pwm/pwm-sun4i.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff

[linux-sunxi] [PATCH v4 1/9] pwm: sunxi: Use regmap API for register access.

2017-02-23 Thread lis8215
From: Siarhei Volkau The patch replaces iomem register access routines to regmap equivalents. Signed-off-by: Siarhei Volkau --- drivers/pwm/Kconfig | 2 +- drivers/pwm/pwm-sun4i.c | 143 2 files

[linux-sunxi] [PATCH v4 9/9] ARM: dts: sun6i: Add the PWM block to the A31/A31s.

2017-02-23 Thread lis8215
From: Siarhei Volkau Signed-off-by: Siarhei Volkau --- arch/arm/boot/dts/sun6i-a31.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index ee1eb6d..fcba129 100644 ---

[linux-sunxi] [PATCH v4 7/9] pwm: sunxi: Add support the Allwinner A31 PWM.

2017-02-23 Thread lis8215
From: Siarhei Volkau This patch introduce the sun6i PWM driver itself: - sun6i channels register and field map, - sun6i prescaler table, - DT bindings for A31 SoC, - documentation update. Signed-off-by: Siarhei Volkau ---

[linux-sunxi] [PATCH v4 6/9] pwm: sunxi: Increase max number of pwm channels.

2017-02-23 Thread lis8215
From: Siarhei Volkau sun6i have 4 pwm channels onboard. This patch increase maximal possible count of channels. Signed-off-by: Siarhei Volkau --- drivers/pwm/pwm-sun4i.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[linux-sunxi] [PATCH v4 3/9] pwm: sunxi: Selectable prescaler table.

2017-02-23 Thread lis8215
From: Siarhei Volkau A31 SoC have a different set of prescalers than sun4i compatible ASoCs, but its position and count in the control register are the same. This patch make the table of prescalers customizable. Signed-off-by: Siarhei Volkau ---

[linux-sunxi] [PATCH v3 3/4] pwm: sunxi: Add support the Allwinner A31 PWM.

2017-02-15 Thread lis8215
From: Siarhei Volkau This patch introduce the sun6i PWM driver itself: - sun6i channels configuration, - sun6i prescaler table, - DT bindings for A31 SoC, - documentation update, - module description and author update. Signed-off-by: Siarhei Volkau

[linux-sunxi] [PATCH v3 1/4] pwm: sunxi: Code switched to regmap API instead of iomem.

2017-02-15 Thread lis8215
From: Siarhei Volkau sun6i PWM has different register map in comparison to sun4i compatible SoCs. But bit map of the registers and behavior are very similar. This patch introduces a uniform way to access PWM registers. Signed-off-by: Siarhei Volkau ---

[linux-sunxi] [PATCH v3 4/4] ARM: dts: sun6i: Add the PWM block to the A31/A31s.

2017-02-15 Thread lis8215
From: Siarhei Volkau Signed-off-by: Siarhei Volkau --- arch/arm/boot/dts/sun6i-a31.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index ee1eb6d..fcba129 100644 ---

[linux-sunxi] [PATCH v3 2/4] pwm: sunxi: Selectable prescaler table for support sun6i.

2017-02-15 Thread lis8215
From: Siarhei Volkau This patch not introduce new features, just prepare code for adding sun6i PWM driver in next commit. A31 SoC have a different set of prescalers than sun4i compatible ASoCs, but its position and count in the control register are the same. This patch make

[linux-sunxi] [PATCH v3 0/4] Add the Allwinner A31/A31s PWM driver

2017-02-15 Thread lis8215
From: Siarhei Volkau Main goal is to add support of the sun6i PWM variant. This is the third version of the sun6i PWM patchset. Difference between v2 and v3: - regmap API used for access to PWM registers. Thanks to Maxime Ripard for pointing me to the regmap API. Siarhei

[linux-sunxi] [PATCH v2 2/4] ARM: pwm: sun4i: selectable prescaler table for support sun6i.

2017-02-07 Thread lis8215
From: Siarhei Volkau This patch not introduce new features, just prepare code for adding sun6i PWM driver in next commit. A31 SoC have a different set of prescalers than others ASoCs, but its position and count in the control register are the same. This patch make the table

[linux-sunxi] [PATCH v2 1/4] ARM: pwm: sun4i: unification of register operations for support sun6i.

2017-02-07 Thread lis8215
From: Siarhei Volkau This patch not introduce new features, just prepare code for adding sun6i PWM driver in next commits. A31 SoC have a different map of PWM registers than others ASoCs, but register bits purposes are very similar. This patch introduce set of register

[linux-sunxi] [PATCH v2 0/4] Add the Allwinner A31/A31s PWM driver

2017-02-07 Thread lis8215
From: Siarhei Volkau First of all im sorry for accidentally sent old patch, please ignore them. This is the second version of the sun6i PWM patchset. - added missing documentation changes - dts changes in separate patch Thanks to Julian Calaby for tips.

[linux-sunxi] [PATCH v2 3/4] ARM: pwm: sun6i: add support the Allwinner A31 PWM.

2017-02-07 Thread lis8215
From: Siarhei Volkau This patch introduce the sun6i PWM driver itself: - sun6i register operations, - sun6i prescaler table, - DT bindings for A31 SoC, - documentation update. Signed-off-by: Siarhei Volkau --- .../devicetree/bindings/pwm/pwm-sun4i.txt

[linux-sunxi] [PATCH v2 4/4] ARM: dts: sun6i: Add the PWM block to the A31/A31s.

2017-02-07 Thread lis8215
From: Siarhei Volkau Signed-off-by: Siarhei Volkau --- arch/arm/boot/dts/sun6i-a31.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index ee1eb6d..fcba129 100644 ---

[linux-sunxi] [PATCH] Add the Allwinner A31/A31s PWM driver.

2017-02-07 Thread lis8215
From: Siarhei Volkau A31 SoC have a different map of PWM registers than others Allwinner SoCs, so the operation of access to the registers reworked for all existing in driver SoCs. Tested on Onda V972 (a31) and Marsboard A20, but only PWM channel 0, because other channels

[linux-sunxi] [PATCH] Add the Allwinner A31/A31s PWM driver.

2017-02-04 Thread lis8215
From: Siarhei Volkau A31 SoC have a different map of PWM registers than others Allwinner SoCs, so the operation of access to the registers reworked for all existing in driver SoCs. Tested on Onda V972 (a31) and Marsboard A20, but only PWM channel 0, because other channels