Commit Graph

8 Commits

Author SHA1 Message Date
Hans de Goede 5b916aa755 leds: cht-wcove: Add support for breathing mode use hw_pattern sysfs API
The hw-blinking of the LED controller in the Whiskey Cove PMIC can also
be used for a hw-breathing effect.

As discussed during review of v2 of the submission of the new
leds-cht-wcove driver, the LED subsystem already supports breathing mode
on several other LED controllers using the hw_pattern interface.

Implement a pattern_set callback to implement breathing mode modelled
after the breathing mode supported by the SC27xx breathing light and
Crane EL15203000 LED drivers. The Whiskey Cove PMIC's breathing mode
is closer to the EL15203000 one then to the SC27xx one since it does
not support staying high / low for a specific time, it only supports
rise and fall times.

As such the supported hw_pattern and the documentation for this is almost
a 1:1 copy of the pattern/docs for the EL15203000 breathing mode.

Suggested-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Link: https://lore.kernel.org/all/6beed61c-1fc6-6525-e873-a8978f5fbffb@gmail.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230430195952.862527-4-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-25 12:16:15 +01:00
Bagas Sanjaya 1d105d6cdd Documentation: leds: Add MT6370 doc to the toctree
Commit 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document")
adds documentation for Mediatek MT6370 RGB LED device, but forgets to
include it to leds toctree index.

Add the missing entry.

Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/
Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230319074903.13075-2-bagasdotme@gmail.com
2023-03-23 15:18:41 +00:00
Shuah Khan 835205f61f docs: leds: fix the following docu build warning
Add leds-qcom-lpg to Documentation/leds/index.rst to fix the following
doc build warning.

Documentation/leds/leds-qcom-lpg.rst: WARNING: document isn't included in any toctree

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230125154426.12464-1-skhan@linuxfoundation.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2023-01-26 11:19:53 -07:00
Mauro Carvalho Chehab e186d80e2b docs: leds: index.rst: add a missing file
Changeset 26a0755304 ("docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication")
didn't include the needed changes at index.rst.

Fixes: 26a0755304 ("docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/36a6e3aef6e57ea349f1b47c7731d4cd1e03ca77.1604312590.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-02 13:45:37 +01:00
Mauro Carvalho Chehab 26a0755304 docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication
The ABI files are supposed to be unique. Yet,
in the specific case of hw_pattern, there are some duplicated
entries as warned by scripts/get_abi.pl:

	Warning: /sys/class/leds/<led>/hw_pattern is defined 3 times:  Documentation/ABI/testing/sysfs-class-led-trigger-pattern:14  Documentation/ABI/testing/sysfs-class-led-driver-sc27xx:0  Documentation/ABI/testing/sysfs-class-led-driver-el15203000:0

Drop the duplication from the ABI files, moving the specific
definitions to files inside Documentation/leds.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/038e57881550550b298e598f8f9b7f20515cbe15.1604042072.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-30 13:15:03 +01:00
Dan Murphy 55d5d3b46b leds: multicolor: Introduce a multicolor class definition
Introduce a multicolor class that groups colored LEDs
within a LED node.

The multicolor class groups monochrome LEDs and allows controlling two
aspects of the final combined color: hue and lightness. The former is
controlled via the intensity file and the latter is controlled
via brightness file.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
[squashed leds: multicolor: Fix camel case in documentation in]
2020-07-22 14:41:29 +02:00
Mauro Carvalho Chehab 09fdc957ad docs: leds: add it to the driver-api book
The contents of leds driver docs is messy: it has lots of
admin-guide stuff and kernel internal ones, just like other
driver subsystems.

I'm opting to keep the dir at the same place and just add
a link to it. This makes clearer that this require changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-07-15 09:20:28 -03:00
Mauro Carvalho Chehab 8dab91970a docs: leds: convert to ReST
Rename the leds documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2019-06-28 20:57:31 +02:00