From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933477AbdBPVJI (ORCPT ); Thu, 16 Feb 2017 16:09:08 -0500 Received: from smtp.exceet.ch ([77.245.33.226]:62019 "EHLO smtp.exceet.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932975AbdBPVJG (ORCPT ); Thu, 16 Feb 2017 16:09:06 -0500 From: Frieder Schrempf To: CC: , , , , , , , , , "Frieder Schrempf" Subject: [PATCH v4 0/3] input: pwm-beeper: add feature to set volume level Date: Thu, 16 Feb 2017 22:08:27 +0100 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [94.216.237.169] X-TM-AS-Product-Ver: SMEX-11.0.0.4255-8.100.1062-22890.002 X-TM-AS-Result: No--7.700700-5.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the driver accept switching volume levels via sysfs. This can be helpful if the beep/bell sound intensity needs to be adapted to the environment of the device. The number of volume levels available and their values can be specified via device tree (similar to pwm-backlight). The volume adjustment is done by changing the duty cycle of the pwm signal. Changes in v4: - move sysfs attributes from class/input to devices/pwm-beeper - rename max_volume_level to max_volume - move array allocation to probe function - rename attribute structs - remove needless code - update date - use generic device properties instead of dt properties Frieder Schrempf (3): input: pwm-beeper: add feature to set volume via sysfs input: pwm-beeper: add documentation for volume devicetree bindings input: pwm-beeper: add devicetree bindings to set volume levels Documentation/ABI/testing/sysfs-devices-pwm-beeper | 17 ++++ .../devicetree/bindings/input/pwm-beeper.txt | 20 ++++ drivers/input/misc/pwm-beeper.c | 111 ++++++++++++++++++++- 3 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-devices-pwm-beeper -- 2.7.4