mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
pwm: Changes for v4.16-rc1
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. -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlp4VVMZHHRoaWVycnku cmVkaW5nQGdtYWlsLmNvbQAKCRDdI6zXfz6zoQaND/kBLRg76Y4FVncBVIXiMP3V 043L4OG4BhkjyNomIsf4hI0Z6QXREEmm6TnhxNVMdW7zyXJshBQR534W/TYFpaAJ hMn8t5F9XS8uw8DETI24BTuuThjE5GkuWVxQojKgxxv5QI4OqML9eChFubVNV6De MqDRHyLPjYYGa7LLgA5a/BwpISvnZbiOwkQWMGQAxC4P4N0cS3mSq/h93HypnRYv IGiFeYWh4PnZvNRfYoQPktXOt3fc/x4DATjnCPUYhd2IkD0mflvae4qvUyC8gea+ s9ujvcQtCIl4zaGCV3ufMxMkSHoDuFDb5rqpEPx7N2GI0VfWVz14xr0J4pQ6I0yo aWRVs2MUSOa32LKCv5Ly2+V/7ChBkyQIrr+/fDlEhMLk/Usf4b+hvBTmzycW6okA zvr5IpJ8TOOAJdoTUZZvY96ZL8oqq4m4AOPmv99Q3d40SM7PwJUjQTZ6d/hmhs4k xyO/BCHKlbO5Pw2CvNG5gDSEdOZJC2TJnJHP5pql6Ek7mT3uslfy851dpj8iK5aQ rp69Qm9Kn8fA76+mg2aW4cmH7mHitN/ExtwFEmgKxAC+WH6RXk0nMWKTGKsaGVLf lEl2K5089a62179lO/Rb4XwgUP7tvX2gIWutN8UjngQDpVn5kJdl7aR+ITFsD6fE Xd5VymGZB+KlF1tk3sQ93A== =TnjC -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
20f9aa2213
@ -5,6 +5,8 @@ Required properties:
|
||||
- compatible: Shall contain "amlogic,meson8b-pwm"
|
||||
or "amlogic,meson-gxbb-pwm"
|
||||
or "amlogic,meson-gxbb-ao-pwm"
|
||||
or "amlogic,meson-axg-ee-pwm"
|
||||
or "amlogic,meson-axg-ao-pwm"
|
||||
- #pwm-cells: Should be 3. See pwm.txt in this directory for a description of
|
||||
the cells format.
|
||||
|
||||
|
@ -411,6 +411,24 @@ static const struct meson_pwm_data pwm_gxbb_ao_data = {
|
||||
.num_parents = ARRAY_SIZE(pwm_gxbb_ao_parent_names),
|
||||
};
|
||||
|
||||
static const char * const pwm_axg_ee_parent_names[] = {
|
||||
"xtal", "fclk_div5", "fclk_div4", "fclk_div3"
|
||||
};
|
||||
|
||||
static const struct meson_pwm_data pwm_axg_ee_data = {
|
||||
.parent_names = pwm_axg_ee_parent_names,
|
||||
.num_parents = ARRAY_SIZE(pwm_axg_ee_parent_names),
|
||||
};
|
||||
|
||||
static const char * const pwm_axg_ao_parent_names[] = {
|
||||
"aoclk81", "xtal", "fclk_div4", "fclk_div5"
|
||||
};
|
||||
|
||||
static const struct meson_pwm_data pwm_axg_ao_data = {
|
||||
.parent_names = pwm_axg_ao_parent_names,
|
||||
.num_parents = ARRAY_SIZE(pwm_axg_ao_parent_names),
|
||||
};
|
||||
|
||||
static const struct of_device_id meson_pwm_matches[] = {
|
||||
{
|
||||
.compatible = "amlogic,meson8b-pwm",
|
||||
@ -424,6 +442,14 @@ static const struct of_device_id meson_pwm_matches[] = {
|
||||
.compatible = "amlogic,meson-gxbb-ao-pwm",
|
||||
.data = &pwm_gxbb_ao_data
|
||||
},
|
||||
{
|
||||
.compatible = "amlogic,meson-axg-ee-pwm",
|
||||
.data = &pwm_axg_ee_data
|
||||
},
|
||||
{
|
||||
.compatible = "amlogic,meson-axg-ao-pwm",
|
||||
.data = &pwm_axg_ao_data
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, meson_pwm_matches);
|
||||
|
@ -145,7 +145,7 @@ static int stmpe_24xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
break;
|
||||
|
||||
case 2:
|
||||
offset = STMPE24XX_PWMIC1;
|
||||
offset = STMPE24XX_PWMIC2;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -263,6 +263,7 @@ static int pwm_export_child(struct device *parent, struct pwm_device *pwm)
|
||||
export->pwm = pwm;
|
||||
mutex_init(&export->lock);
|
||||
|
||||
export->child.class = parent->class;
|
||||
export->child.release = pwm_export_release;
|
||||
export->child.parent = parent;
|
||||
export->child.devt = MKDEV(0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user