04 Nov, 2019
3 commits
-
Add the missing device managed API for registration and
unregistration for the LED flash class.Signed-off-by: Dan Murphy
Signed-off-by: Pavel Machek -
extern is implied and is not needed in the header file.
Remove the extern keyword and re-align the code.Signed-off-by: Dan Murphy
Signed-off-by: Pavel Machek -
Convert the #define non-extended registration API to an
inline function.Signed-off-by: Dan Murphy
Signed-off-by: Pavel Machek
26 Jul, 2019
1 commit
-
Replace of_led_classdev_register() with led_classdev_register_ext(), which
accepts easily extendable struct led_init_data, instead of the fixed
struct device_node argument. The latter can be now passed in an fwnode
property of the struct led_init_data.The modification is driven by the need for passing additional arguments
required for the forthcoming generic mechanism for composing LED names.
Currently the LED name is conveyed in the "name" char pointer property of
the struct led_classdev. This is redundant since LED class device name
is accessible throughout the whole LED class device life time via
associated struct device's kobj->name property.The change will not break any existing clients since the patch alters
also existing led_classdev{_flash}_register() macro wrappers, that pass
NULL in place of init_data, which leads to using legacy name
initialization path basing on the struct led_classdev's "name" property.Three existing users of devm_of_led_classdev_registers() are modified
to use devm_led_classdev_register(), which will not impact their
operation since they in fact didn't need to pass struct device_node on
registration from the beginning.Signed-off-by: Jacek Anaszewski
Cc: Baolin Wang
Cc: Dan Murphy
Cc: Daniel Mack
Cc: Linus Walleij
Cc: Oleh Kravchenko
Cc: Sakari Ailus
Cc: Simon Shields
Acked-by: Pavel Machek
19 Jun, 2019
1 commit
-
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundationthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Enrico Weigelt
Reviewed-by: Kate Stewart
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman
12 Dec, 2017
1 commit
-
The logic at V4L2 led core assumes that the flash struct
can be null. However, it doesn't check for null while
trying to set, causing some smatch to warn:drivers/media/v4l2-core/v4l2-flash-led-class.c:210 v4l2_flash_s_ctrl() error: we previously assumed 'fled_cdev' could be null (see line 200)
Signed-off-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
31 Mar, 2015
1 commit
-
LED_FLASH_MAX_SYSFS_GROUPS macro had value that was relevant for
previous version of the patches introducing LED Flash class. Currently
it is required to reserve the room for maximum 4 sysfs groups.
Since the last element of the struct attribute_group array passed to
the function device_create_with_groups has to be NULL, the size of the
array has to be greater by one than maximum allowed number of groups.
Therefore, the name of the macro is being changed to
LED_FLASH_SYSFS_GROUPS_SIZE, to make it more accurrate.Signed-off-by: Jacek Anaszewski
Acked-by: Kyungmin Park
Cc: Bryan Wu
Cc: Richard Purdie
Signed-off-by: Bryan Wu
10 Mar, 2015
1 commit
-
Synchronized flash strobe feature has been considered not fitting
for LED subsystem sysfs interface and thus is being removed.Signed-off-by: Jacek Anaszewski
Acked-by: Kyungmin Park
Cc: Richard Purdie
Signed-off-by: Bryan Wu
25 Feb, 2015
1 commit
-
Avoid including v4l2-controls.h, as this is stray code from the early
versions of the LED / V4L2 flash API integration patches. LED Flash
class doesn't depend on V4L2 subsystem.Signed-off-by: Jacek Anaszewski
Signed-off-by: Bryan Wu
27 Jan, 2015
1 commit
-
Some LED devices support two operation modes - torch and flash.
This patch provides support for flash LED devices in the LED subsystem
by introducing new sysfs attributes and kernel internal interface.
The attributes being introduced are: flash_brightness, flash_strobe,
flash_timeout, max_flash_timeout, max_flash_brightness, flash_fault,
flash_sync_strobe and available_sync_leds. All the flash related
features are placed in a separate module.The modifications aim to be compatible with V4L2 framework requirements
related to the flash devices management. The design assumes that V4L2
sub-device can take of the LED class device control and communicate
with it through the kernel internal interface. When V4L2 Flash sub-device
file is opened, the LED class device sysfs interface is made
unavailable.Signed-off-by: Jacek Anaszewski
Acked-by: Kyungmin Park
Cc: Richard Purdie
Acked-by: Pavel Machek
Signed-off-by: Bryan Wu