Skip to content

Commit 9dd6a64

Browse files
committed
Merge tag 'pwm/for-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm updates from Thierry Reding: "The Meson PWM controller driver gains support for the AXG series and a minor bug is fixed for the STMPE driver. To round things off, the class is now set for PWM channels exported via sysfs which allows non-root access, provided that the system has been configured accordingly" * tag 'pwm/for-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: meson: Add clock source configuration for Meson-AXG dt-bindings: pwm: Update bindings for the Meson-AXG pwm: stmpe: Fix wrong register offset for hwpwm=2 case pwm: Set class for exported channels in sysfs
2 parents 2bdcffd + ceef601 commit 9dd6a64

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

Documentation/devicetree/bindings/pwm/pwm-meson.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Required properties:
55
- compatible: Shall contain "amlogic,meson8b-pwm"
66
or "amlogic,meson-gxbb-pwm"
77
or "amlogic,meson-gxbb-ao-pwm"
8+
or "amlogic,meson-axg-ee-pwm"
9+
or "amlogic,meson-axg-ao-pwm"
810
- #pwm-cells: Should be 3. See pwm.txt in this directory for a description of
911
the cells format.
1012

drivers/pwm/pwm-meson.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,24 @@ static const struct meson_pwm_data pwm_gxbb_ao_data = {
411411
.num_parents = ARRAY_SIZE(pwm_gxbb_ao_parent_names),
412412
};
413413

414+
static const char * const pwm_axg_ee_parent_names[] = {
415+
"xtal", "fclk_div5", "fclk_div4", "fclk_div3"
416+
};
417+
418+
static const struct meson_pwm_data pwm_axg_ee_data = {
419+
.parent_names = pwm_axg_ee_parent_names,
420+
.num_parents = ARRAY_SIZE(pwm_axg_ee_parent_names),
421+
};
422+
423+
static const char * const pwm_axg_ao_parent_names[] = {
424+
"aoclk81", "xtal", "fclk_div4", "fclk_div5"
425+
};
426+
427+
static const struct meson_pwm_data pwm_axg_ao_data = {
428+
.parent_names = pwm_axg_ao_parent_names,
429+
.num_parents = ARRAY_SIZE(pwm_axg_ao_parent_names),
430+
};
431+
414432
static const struct of_device_id meson_pwm_matches[] = {
415433
{
416434
.compatible = "amlogic,meson8b-pwm",
@@ -424,6 +442,14 @@ static const struct of_device_id meson_pwm_matches[] = {
424442
.compatible = "amlogic,meson-gxbb-ao-pwm",
425443
.data = &pwm_gxbb_ao_data
426444
},
445+
{
446+
.compatible = "amlogic,meson-axg-ee-pwm",
447+
.data = &pwm_axg_ee_data
448+
},
449+
{
450+
.compatible = "amlogic,meson-axg-ao-pwm",
451+
.data = &pwm_axg_ao_data
452+
},
427453
{},
428454
};
429455
MODULE_DEVICE_TABLE(of, meson_pwm_matches);

drivers/pwm/pwm-stmpe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
145145
break;
146146

147147
case 2:
148-
offset = STMPE24XX_PWMIC1;
148+
offset = STMPE24XX_PWMIC2;
149149
break;
150150

151151
default:

drivers/pwm/sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ static int pwm_export_child(struct device *parent, struct pwm_device *pwm)
263263
export->pwm = pwm;
264264
mutex_init(&export->lock);
265265

266+
export->child.class = parent->class;
266267
export->child.release = pwm_export_release;
267268
export->child.parent = parent;
268269
export->child.devt = MKDEV(0, 0);

0 commit comments

Comments
 (0)