Skip to contentSkip to conversation

Input: pwm-beeper: support customized freq for SND_BELL

PATCH Superseded Heiko Schocher 4 participants 9 messages Feb 20, 2017 – Mar 1, 2017

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: pwm-beeper: support customized freq for SND_BELL

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"
- add comment from Dmitry Torokhov:
use device_property_read_u32() instead of of_property_read_u32()
- rebased against c470abd4fde40ea6a0846a2beab642a578c0b8cd Linux 4.10

 .../devicetree/bindings/input/pwm-beeper.txt       |  3 ++
 drivers/input/misc/pwm-beeper.c                    | 36 ++++++++++++++++------
 2 files changed, 30 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/input/pwm-beeper.txt +3 -0
index be332ae..4e4e128 100644
@@ -5,3 +5,6 @@ Registers a PWM device as beeper.
 Required properties:
 - compatible: should be "pwm-beeper"
 - pwms: phandle to the physical PWM device
+
+optional properties:
+- beeper-hz:  bell frequency in Hz
drivers/input/misc/pwm-beeper.c +27 -9
index 5f9655d..5ea6fda 100644
@@ -27,6 +27,7 @@ struct pwm_beeper {
 	struct pwm_device *pwm;
 	struct work_struct work;
 	unsigned long period;
+	unsigned int bell_frequency;
 };
 
 #define HZ_TO_NANOSECONDS(x) (1000000000UL/(x))
@@ -58,20 +59,17 @@ static int pwm_beeper_event(struct input_dev *input,
 	if (type != EV_SND || value < 0)
 		return -EINVAL;
 
-	switch (code) {
-	case SND_BELL:
-		value = value ? 1000 : 0;
-		break;
-	case SND_TONE:
-		break;
-	default:
+	if (code != SND_BELL && code != SND_TONE)
 		return -EINVAL;
-	}
 
 	if (value == 0)
 		beeper->period = 0;
-	else
+	else {
+		if (code == SND_BELL)
+			value = beeper->bell_frequency;
+
 		beeper->period = HZ_TO_NANOSECONDS(value);
+	}
 
 	schedule_work(&beeper->work);
 
@@ -93,6 +91,25 @@ static void pwm_beeper_close(struct input_dev *input)
 	pwm_beeper_stop(beeper);
 }
 
+static void pwm_beeper_init_bell_frequency(struct device *dev,
+					   struct pwm_beeper *beeper)
+{
+	struct device_node *node;
+	unsigned int bell_frequency = 1000;
+	int err;
+
+	if (IS_ENABLED(CONFIG_OF)) {
+		node = dev->of_node;
+		err = device_property_read_u32(dev, "beeper-hz",
+					       &bell_frequency);
+		if (err < 0)
+			dev_dbg(dev, "Failed to read beeper-hz, using default: %u Hz\n",
+				bell_frequency);
+	}
+
+	beeper->bell_frequency = bell_frequency;
+}
+
 static int pwm_beeper_probe(struct platform_device *pdev)
 {
 	unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);
@@ -122,6 +139,7 @@ static int pwm_beeper_probe(struct platform_device *pdev)
 	pwm_apply_args(beeper->pwm);
 
 	INIT_WORK(&beeper->work, pwm_beeper_work);
+	pwm_beeper_init_bell_frequency(&pdev->dev, beeper);
 
 	beeper->input = input_allocate_device();
 	if (!beeper->input) {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 9 lines · Heiko Schocher

From: Guan Ben <ben.guan-dUNdQdTMQaZWk0Htik3J/[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

Quoted 5 lines

---

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"

Is there a separate patch for the devicetree bindings documentation?

Quoted 33 lines

- add comment from Dmitry Torokhov:
use device_property_read_u32() instead of of_property_read_u32()
- rebased against c470abd4fde40ea6a0846a2beab642a578c0b8cd Linux 4.10

 .../devicetree/bindings/input/pwm-beeper.txt       |  3 ++
 drivers/input/misc/pwm-beeper.c                    | 36 ++++++++++++++++------
 2 files changed, 30 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/input/pwm-beeper.txt +3 -0
index be332ae..4e4e128 100644
@@ -5,3 +5,6 @@ Registers a PWM device as beeper.
 Required properties:
 - compatible: should be "pwm-beeper"
 - pwms: phandle to the physical PWM device
+
+optional properties:
+- beeper-hz:  bell frequency in Hz
drivers/input/misc/pwm-beeper.c +1 -0
index 5f9655d..5ea6fda 100644
@@ -27,6 +27,7 @@ struct pwm_beeper {
 	struct pwm_device *pwm;
 	struct work_struct work;
 	unsigned long period;
+	unsigned int bell_frequency;
 };
 
 #define HZ_TO_NANOSECONDS(x) (1000000000UL/(x))

drivers/input/misc/pwm-beeper.c static int pwm_beeper_event(struct input_dev *input, · line 63

Quoted 6 lines
drivers/input/misc/pwm-beeper.c +0 -3
@@ -58,20 +59,17 @@ static int pwm_beeper_event(struct input_dev *input,
 	if (type != EV_SND || value < 0)
 		return -EINVAL;
 
-	switch (code) {
-	case SND_BELL:
-		value = value ? 1000 : 0;

This would be much simpler if you just changed the single line above:

		value = value ? beeper->bell_frequency : 0;
Quoted 22 lines
drivers/input/misc/pwm-beeper.c +6 -6
-		break;
-	case SND_TONE:
-		break;
-	default:
+	if (code != SND_BELL && code != SND_TONE)
 		return -EINVAL;
-	}
 
 	if (value == 0)
 		beeper->period = 0;
-	else
+	else {
+		if (code == SND_BELL)
+			value = beeper->bell_frequency;
+
 		beeper->period = HZ_TO_NANOSECONDS(value);
+	}
 
 	schedule_work(&beeper->work);
 
@@ -93,6 +91,25 @@ static void pwm_beeper_close(struct input_dev *input)
 	pwm_beeper_stop(beeper);

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 101

Quoted 10 lines
drivers/input/misc/pwm-beeper.c +8 -0
 }
 
+static void pwm_beeper_init_bell_frequency(struct device *dev,
+					   struct pwm_beeper *beeper)
+{
+	struct device_node *node;
+	unsigned int bell_frequency = 1000;
+	int err;
+
+	if (IS_ENABLED(CONFIG_OF)) {

I don't think the check for CONFIG_OF is needed when using device_property_read_u32().

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 102

Quoted 1 line
drivers/input/misc/pwm-beeper.c +1 -0
+		node = dev->of_node;

node variable is never used

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 104

Quoted 2 lines
drivers/input/misc/pwm-beeper.c +2 -0
+		err = device_property_read_u32(dev, "beeper-hz",
+					       &bell_frequency);

Does the device_property_read_u32() function guarantee that bell_frequency is not modified when err < 0 ?

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 106

Quoted 2 lines
drivers/input/misc/pwm-beeper.c +2 -0
+		if (err < 0)
+			dev_dbg(dev, "Failed to read beeper-hz, using default: %u Hz\n",

"Failed" sounds like an error, but this is a perfectly normal thing to happen. Maybe better to say "'beeper-hz' not specified, using default: %u Hz\n".

Quoted 10 lines
drivers/input/misc/pwm-beeper.c +6 -0
+				bell_frequency);
+	}
+
+	beeper->bell_frequency = bell_frequency;
+}
+
 static int pwm_beeper_probe(struct platform_device *pdev)
 {
 	unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);

drivers/input/misc/pwm-beeper.c static int pwm_beeper_probe(struct platform_device *pdev) · line 142

Quoted 4 lines
drivers/input/misc/pwm-beeper.c +1 -0
@@ -122,6 +139,7 @@ static int pwm_beeper_probe(struct platform_device *pdev)
 	pwm_apply_args(beeper->pwm);
 
 	INIT_WORK(&beeper->work, pwm_beeper_work);
+	pwm_beeper_init_bell_frequency(&pdev->dev, beeper);

This function is so simple, it could just be done inline here.

drivers/input/misc/pwm-beeper.c static int pwm_beeper_probe(struct platform_device *pdev)

Quoted 4 lines
drivers/input/misc/pwm-beeper.c +0 -0
 	beeper->input = input_allocate_device();
 	if (!beeper->input) {
 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Acked-by on v2 1/1
#7 lore raw
In reply to Heiko Schocher
Quoted 20 lines · Heiko Schocher

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"
- add comment from Dmitry Torokhov:
use device_property_read_u32() instead of of_property_read_u32()
- rebased against c470abd4fde40ea6a0846a2beab642a578c0b8cd Linux 4.10

Quoted 1 line
 .../devicetree/bindings/input/pwm-beeper.txt       |  3 ++

A few comments on the driver though.

Quoted 55 lines
 drivers/input/misc/pwm-beeper.c                    | 36 ++++++++++++++++------
 2 files changed, 30 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/input/pwm-beeper.txt +3 -0
index be332ae..4e4e128 100644
@@ -5,3 +5,6 @@ Registers a PWM device as beeper.
 Required properties:
 - compatible: should be "pwm-beeper"
 - pwms: phandle to the physical PWM device
+
+optional properties:
+- beeper-hz:  bell frequency in Hz
drivers/input/misc/pwm-beeper.c +7 -9
index 5f9655d..5ea6fda 100644
@@ -27,6 +27,7 @@ struct pwm_beeper {
 	struct pwm_device *pwm;
 	struct work_struct work;
 	unsigned long period;
+	unsigned int bell_frequency;
 };
 
 #define HZ_TO_NANOSECONDS(x) (1000000000UL/(x))
@@ -58,20 +59,17 @@ static int pwm_beeper_event(struct input_dev *input,
 	if (type != EV_SND || value < 0)
 		return -EINVAL;
 
-	switch (code) {
-	case SND_BELL:
-		value = value ? 1000 : 0;
-		break;
-	case SND_TONE:
-		break;
-	default:
+	if (code != SND_BELL && code != SND_TONE)
 		return -EINVAL;
-	}
 
 	if (value == 0)
 		beeper->period = 0;
-	else
+	else {
+		if (code == SND_BELL)
+			value = beeper->bell_frequency;
+
 		beeper->period = HZ_TO_NANOSECONDS(value);
+	}
 
 	schedule_work(&beeper->work);
 
@@ -93,6 +91,25 @@ static void pwm_beeper_close(struct input_dev *input)
 	pwm_beeper_stop(beeper);

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 101

Quoted 10 lines
drivers/input/misc/pwm-beeper.c +8 -0
 }
 
+static void pwm_beeper_init_bell_frequency(struct device *dev,
+					   struct pwm_beeper *beeper)
+{
+	struct device_node *node;
+	unsigned int bell_frequency = 1000;
+	int err;
+
+	if (IS_ENABLED(CONFIG_OF)) {

You don't really need this. There should be an empty version of the function.

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 102

Quoted 1 line
drivers/input/misc/pwm-beeper.c +1 -0
+		node = dev->of_node;

You don't need this line.

Quoted 24 lines
drivers/input/misc/pwm-beeper.c +11 -0
+		err = device_property_read_u32(dev, "beeper-hz",
+					       &bell_frequency);
+		if (err < 0)
+			dev_dbg(dev, "Failed to read beeper-hz, using default: %u Hz\n",
+				bell_frequency);
+	}
+
+	beeper->bell_frequency = bell_frequency;
+}
+
 static int pwm_beeper_probe(struct platform_device *pdev)
 {
 	unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);
@@ -122,6 +139,7 @@ static int pwm_beeper_probe(struct platform_device *pdev)
 	pwm_apply_args(beeper->pwm);
 
 	INIT_WORK(&beeper->work, pwm_beeper_work);
+	pwm_beeper_init_bell_frequency(&pdev->dev, beeper);
 
 	beeper->input = input_allocate_device();
 	if (!beeper->input) {
Signature · 1 line
2.7.4
#2 lore raw
In reply to David Lechner

Hello David,

Am 27.02.2017 um 19:11 schrieb David Lechner:

Quoted 12 lines · Heiko Schocher
Quoted 11 lines

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Quoted 5 lines
Quoted 3 lines

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"

Is there a separate patch for the devicetree bindings documentation?

No, it is in this patch ... In the meantime I got an Acked-by from Rob Herring ...

Quoted 37 lines
Quoted 37 lines

- add comment from Dmitry Torokhov:
use device_property_read_u32() instead of of_property_read_u32()
- rebased against c470abd4fde40ea6a0846a2beab642a578c0b8cd Linux 4.10

 .../devicetree/bindings/input/pwm-beeper.txt       |  3 ++
 drivers/input/misc/pwm-beeper.c                    | 36 ++++++++++++++++------
 2 files changed, 30 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/input/pwm-beeper.txt +3 -0
index be332ae..4e4e128 100644
@@ -5,3 +5,6 @@ Registers a PWM device as beeper.
 Required properties:
 - compatible: should be "pwm-beeper"
 - pwms: phandle to the physical PWM device
+
+optional properties:
+- beeper-hz:  bell frequency in Hz
drivers/input/misc/pwm-beeper.c +1 -0
index 5f9655d..5ea6fda 100644
@@ -27,6 +27,7 @@ struct pwm_beeper {
     struct pwm_device *pwm;
     struct work_struct work;
     unsigned long period;
+    unsigned int bell_frequency;
 };
 
 #define HZ_TO_NANOSECONDS(x) (1000000000UL/(x))
@@ -58,20 +59,17 @@ static int pwm_beeper_event(struct input_dev *input,
     if (type != EV_SND || value < 0)
         return -EINVAL;
 
Quoted 7 lines

drivers/input/misc/pwm-beeper.c static int pwm_beeper_event(struct input_dev *input, · line 63

Quoted 3 lines
drivers/input/misc/pwm-beeper.c +0 -3
-    switch (code) {
-    case SND_BELL:
-        value = value ? 1000 : 0;

This would be much simpler if you just changed the single line above:

         value = value ? beeper->bell_frequency : 0;

Ok, I readded the switch statement, and changed this line.

Quoted 24 lines
Quoted 24 lines
drivers/input/misc/pwm-beeper.c +6 -6
-        break;
-    case SND_TONE:
-        break;
-    default:
+    if (code != SND_BELL && code != SND_TONE)
         return -EINVAL;
-    }
 
     if (value == 0)
         beeper->period = 0;
-    else
+    else {
+        if (code == SND_BELL)
+            value = beeper->bell_frequency;
+
         beeper->period = HZ_TO_NANOSECONDS(value);
+    }
 
     schedule_work(&beeper->work);
 
@@ -93,6 +91,25 @@ static void pwm_beeper_close(struct input_dev *input)
     pwm_beeper_stop(beeper);
 }
 
Quoted 10 lines

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 101

Quoted 8 lines
drivers/input/misc/pwm-beeper.c +8 -0
+static void pwm_beeper_init_bell_frequency(struct device *dev,
+                       struct pwm_beeper *beeper)
+{
+    struct device_node *node;
+    unsigned int bell_frequency = 1000;
+    int err;
+
+    if (IS_ENABLED(CONFIG_OF)) {

I don't think the check for CONFIG_OF is needed when using device_property_read_u32().

Yes, removed.

Quoted 4 lines

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 102

Quoted 2 lines
drivers/input/misc/pwm-beeper.c +1 -0
+        node = dev->of_node;

node variable is never used

Removed.

Quoted 6 lines

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 104

Quoted 3 lines
drivers/input/misc/pwm-beeper.c +2 -0
+        err = device_property_read_u32(dev, "beeper-hz",
+                           &bell_frequency);

Does the device_property_read_u32() function guarantee that bell_frequency is not modified when err < 0 ?

Yes. This function "ends" in of_property_read_variable_u32_array() which first searches the property (If not found returns) and if all checks are fine, fills the "*out_values" with the values from the property...

Quoted 5 lines

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 106

Quoted 2 lines
drivers/input/misc/pwm-beeper.c +2 -0
+        if (err < 0)
+            dev_dbg(dev, "Failed to read beeper-hz, using default: %u Hz\n",

"Failed" sounds like an error, but this is a perfectly normal thing to happen. Maybe better to say "'beeper-hz' not specified, using default: %u Hz\n".

Changed.

Quoted 13 lines
Quoted 13 lines
drivers/input/misc/pwm-beeper.c +6 -0
+                bell_frequency);
+    }
+
+    beeper->bell_frequency = bell_frequency;
+}
+
 static int pwm_beeper_probe(struct platform_device *pdev)
 {
     unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);
@@ -122,6 +139,7 @@ static int pwm_beeper_probe(struct platform_device *pdev)
     pwm_apply_args(beeper->pwm);
 
Quoted 4 lines

drivers/input/misc/pwm-beeper.c static int pwm_beeper_probe(struct platform_device *pdev) · line 142

Quoted 2 lines
drivers/input/misc/pwm-beeper.c +1 -0
     INIT_WORK(&beeper->work, pwm_beeper_work);
+    pwm_beeper_init_bell_frequency(&pdev->dev, beeper);

This function is so simple, it could just be done inline here.

Indeed ... changed.

Thanks!

bye,
Heiko

Quoted 6 lines
Quoted 5 lines
drivers/input/misc/pwm-beeper.c +0 -0
     beeper->input = input_allocate_device();
     if (!beeper->input) {
 
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#8 lore raw
In reply to Rob Herring

Hello Rob,

Am 27.02.2017 um 20:10 schrieb Rob Herring:

Quoted 21 lines · Heiko Schocher
Quoted 20 lines

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"
- add comment from Dmitry Torokhov:
use device_property_read_u32() instead of of_property_read_u32()
- rebased against c470abd4fde40ea6a0846a2beab642a578c0b8cd Linux 4.10

Quoted 3 lines
Quoted 1 line
  .../devicetree/bindings/input/pwm-beeper.txt       |  3 ++

Thanks!

Quoted 59 lines

A few comments on the driver though.

Quoted 57 lines
  drivers/input/misc/pwm-beeper.c                    | 36 ++++++++++++++++------
  2 files changed, 30 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/input/pwm-beeper.txt +3 -0
index be332ae..4e4e128 100644
@@ -5,3 +5,6 @@ Registers a PWM device as beeper.
  Required properties:
  - compatible: should be "pwm-beeper"
  - pwms: phandle to the physical PWM device
+
+optional properties:
+- beeper-hz:  bell frequency in Hz
drivers/input/misc/pwm-beeper.c +7 -9
index 5f9655d..5ea6fda 100644
@@ -27,6 +27,7 @@ struct pwm_beeper {
  	struct pwm_device *pwm;
  	struct work_struct work;
  	unsigned long period;
+	unsigned int bell_frequency;
  };
 
  #define HZ_TO_NANOSECONDS(x) (1000000000UL/(x))
@@ -58,20 +59,17 @@ static int pwm_beeper_event(struct input_dev *input,
  	if (type != EV_SND || value < 0)
  		return -EINVAL;
 
-	switch (code) {
-	case SND_BELL:
-		value = value ? 1000 : 0;
-		break;
-	case SND_TONE:
-		break;
-	default:
+	if (code != SND_BELL && code != SND_TONE)
  		return -EINVAL;
-	}
 
  	if (value == 0)
  		beeper->period = 0;
-	else
+	else {
+		if (code == SND_BELL)
+			value = beeper->bell_frequency;
+
  		beeper->period = HZ_TO_NANOSECONDS(value);
+	}
 
  	schedule_work(&beeper->work);
 
@@ -93,6 +91,25 @@ static void pwm_beeper_close(struct input_dev *input)
  	pwm_beeper_stop(beeper);
  }
 
Quoted 11 lines

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 101

Quoted 8 lines
drivers/input/misc/pwm-beeper.c +8 -0
+static void pwm_beeper_init_bell_frequency(struct device *dev,
+					   struct pwm_beeper *beeper)
+{
+	struct device_node *node;
+	unsigned int bell_frequency = 1000;
+	int err;
+
+	if (IS_ENABLED(CONFIG_OF)) {

You don't really need this. There should be an empty version of the function.

removed, as also David mentioned this.

Quoted 4 lines

drivers/input/misc/pwm-beeper.c static void pwm_beeper_close(struct input_dev *input) · line 102

Quoted 2 lines
drivers/input/misc/pwm-beeper.c +1 -0
+		node = dev->of_node;

You don't need this line.

Yep, removed.

Quoted 17 lines
Quoted 17 lines
drivers/input/misc/pwm-beeper.c +10 -0
+		err = device_property_read_u32(dev, "beeper-hz",
+					       &bell_frequency);
+		if (err < 0)
+			dev_dbg(dev, "Failed to read beeper-hz, using default: %u Hz\n",
+				bell_frequency);
+	}
+
+	beeper->bell_frequency = bell_frequency;
+}
+
  static int pwm_beeper_probe(struct platform_device *pdev)
  {
  	unsigned long pwm_id = (unsigned long)dev_get_platdata(&pdev->dev);
@@ -122,6 +139,7 @@ static int pwm_beeper_probe(struct platform_device *pdev)
  	pwm_apply_args(beeper->pwm);
 
Quoted 9 lines
Quoted 8 lines
drivers/input/misc/pwm-beeper.c +1 -1
  	INIT_WORK(&beeper->work, pwm_beeper_work);
+	pwm_beeper_init_bell_frequency(&pdev->dev, beeper);
 
  	beeper->input = input_allocate_device();
  	if (!beeper->input) {
--

2.7.4

Thanks!

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw
In reply to Heiko Schocher
Quoted 15 lines · Heiko Schocher

Hello David,

Am 27.02.2017 um 19:11 schrieb David Lechner:

Quoted 12 lines · Heiko Schocher
Quoted 11 lines

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"

Is there a separate patch for the devicetree bindings documentation?

No, it is in this patch ... In the meantime I got an Acked-by from Rob Herring ...

What I should have said is that, in general, I think it is preferred to have the device tree bindings as a separate patch from the code changes.

#4 lore raw

Hello David,

Am 28.02.2017 um 06:30 schrieb David Lechner:

Quoted 20 lines · Heiko Schocher
Quoted 19 lines

Hello David,

Am 27.02.2017 um 19:11 schrieb David Lechner:

Quoted 16 lines · Heiko Schocher
Quoted 14 lines

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Is there a separate patch for the devicetree bindings documentation?

No, it is in this patch ... In the meantime I got an Acked-by from Rob Herring ...

What I should have said is that, in general, I think it is preferred to have the device tree bindings as a separate patch from the code changes.

I can split this into 2 patches ...

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
maintainer
#5 lore raw
Quoted 30 lines · Heiko Schocher

Hello David,

Am 28.02.2017 um 06:30 schrieb David Lechner:

Quoted 16 lines · Heiko Schocher
Quoted 15 lines

Hello David,

Am 27.02.2017 um 19:11 schrieb David Lechner:

Quoted 12 lines · Heiko Schocher
Quoted 11 lines

From: Guan Ben <[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"

Is there a separate patch for the devicetree bindings

documentation?

Quoted 5 lines
Quoted 4 lines

No, it is in this patch ... In the meantime I got an Acked-by from Rob Herring ...

Quoted 5 lines
Quoted 1 line

What I should have said is that, in general, I think it is preferred

to have the device tree

Quoted 1 line

bindings as a separate patch from the code changes.

I can split this into 2 patches ...

Don't - since Rob already asked DT change you don't need to post to device tree list again and I'll merge them back together since they do not make sense separately.

Thanks.

Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

Hello Dimitry,

Am 28.02.2017 um 07:20 schrieb Dmitry Torokhov:

Quoted 31 lines · Heiko Schocher
Quoted 30 lines

Hello David,

Am 28.02.2017 um 06:30 schrieb David Lechner:

Quoted 16 lines · Heiko Schocher
Quoted 15 lines

Hello David,

Am 27.02.2017 um 19:11 schrieb David Lechner:

Quoted 12 lines · Heiko Schocher
Quoted 11 lines

From: Guan Ben <ben.guan-dUNdQdTMQaZWk0Htik3J/[email protected]>

extend the pwm-beeper driver to support customized frequency for SND_BELL from device tree.

---

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Changes in v2:
- add comment from Rob Herring:
rename property name "bell-frequency" to "beeper-hz"

Is there a separate patch for the devicetree bindings

documentation?

Quoted 5 lines
Quoted 4 lines

No, it is in this patch ... In the meantime I got an Acked-by from Rob Herring ...

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

What I should have said is that, in general, I think it is preferred

to have the device tree

Quoted 1 line

bindings as a separate patch from the code changes.

I can split this into 2 patches ...

Don't - since Rob already asked DT change you don't need to post to device tree list again and I'll merge them back together since they do not make sense separately.

Ok, I post a v3 with the changes suggested from David and Rob soon, without splitting.

Thanks!

bye,
Heiko

Signature · 6 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html