If both set_brightness functions return -ENOTSUPP, then the LED doesn't
support setting a fixed brightness value, and the error message isn't
helpful. This can be the case e.g. for LEDs supporting a specific hw
trigger only.
Pinched the subject line and commit message from Heiner:
Link: https://lore.kernel.org/all/44177e37-9512-4044-8991-bb23b184bf37@gmail.com/
Reworked the function to provide Heiner's required semantics whilst
simultaneously increasing readability and flow.
Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Change-Id: If8d66258ea3a728ae5da6d736941d8da25715a35
some sdio device's signal level is already 1.8V before voltage switch,
so we should avoid generating clock multiple times during the 10ms.
Change-Id: Icfeaa8e3131e60c994ff89a49b9bb4f04781135e
According to datasheet:
ATDTW: Add dTD TripWire – RW. Default = 0b.
This bit is used as a semaphore to ensure the to proper addition
of a new dTD to an active (primed) endpoint’s linked list. This
bit is set and cleared by software. This bit shall also be
cleared by hardware when its state machine is in a hazard region
for which adding a dTD to a primed endpoint may go unrecognized.
This logic is already implemented in mv_udc_core.c, fsl_udc_core.c
and chipidea/udc.c
Change-Id: Ide5b5f3ff0ca04216fa0e6889eb18eb9cd3f7819
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
HDC app on openharmony determine when to renew session relying
on udc return -ECONNRESET, if udc doesn't return -ECONNRESET on
the queued requests at disconnecting, the HDC app would do two
enumuration during reconnect.
Change-Id: Ia853b62430d87937d6c45cc6f0e507a6524528e5
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
HDC app on openharmony determine when to renew session relying
on udc return -ECONNRESET, if udc doesn't return -ECONNRESET on
the queued requests at disconnecting, the HDC app would do two
enumuration during reconnect.
Change-Id: I7bad10082b5c5ab3ad29b279e9b7a815d11c146e
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
USB Device disconnect detection rely on vbus detection, this is done
by using extcon or otg driver based on internal ID/VBUS circuit. But
for some boards, the vbus is connected to a charger, thus no way to
obtain vbus status directly.
Most application works fine without the disconnect since there is
a bus reset after reconnection. But if the f_fs application rely
on the -ECONNRESET on usb request to do some software reinit, it
may cause problem.
To fix problems with this case, we add a notifier connected to power
supply driver similar to extcon.
Change-Id: I58c07dd42419589ef77d0a3b4b2efddd2ab8293a
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
error like this blow:
drivers/clocksource/timer-k1x.c:302:12: error: conflicting types for 'timer_shutdown'; have 'int(struct clock_event_device *)'
302 | static int timer_shutdown(struct clock_event_device *dev)
| ^~~~~~~~~~~~~~
In file included from ./include/linux/workqueue.h:9,
from ./include/linux/rhashtable-types.h:15,
from ./include/linux/ipc.h:7,
from ./include/uapi/linux/sem.h:5,
from ./include/linux/sem.h:5,
from ./include/linux/sched.h:15,
from ./include/linux/hardirq.h:9,
from ./include/linux/interrupt.h:11,
from drivers/clocksource/timer-k1x.c:10:
./include/linux/timer.h:188:12: note: previous declaration of 'timer_shutdown' with type 'int(struct timer_list *)'
188 | extern int timer_shutdown(struct timer_list *timer);
Change-Id: I2ee903478e121f0428d7820bcd47025d0fe37c8b
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
we can't put the emac suspend callback into the suspend_noirq process
which need irq enabled
This reverts commit 6901b9e2db.
Change-Id: Iefceb2aad7d4b3286eb219601c46a9943de719d2
During startup, frequent hot-plug events in a short
period cause HDMI initialization failures, leading
to HDMI screen display issues and slow initialization.
Change-Id: Ieb71fb1df9ee8858c77148e94be114c2f2c10ccb
x60 handle rcpu flexcan irq through mailbox instead of
rpmsg can save more time.
Change-Id: I5611e307756e07257bd092a687dd9baf132f1503
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
when run a program which conatain matrix instruction in docker,
the sched_setaffinity(current->pid, cpumask) maybe failed because
of the namespace, sometimes, sched_setaffinity() can't find the
task with current->pid. So, use sched_setaffinity(0, cpumask),
sched_setaffinity() will use 'current' task directly.
When try to bind the program to a ai core, the affinity should be
check, if the program has been bind to none-ai core already, auto
bind will be ignored.
Change-Id: I81817cf81aa8923a7ad44fb25b76230b5c448e2c
Signed-off-by: zhangmeng <zhangmeng.kevin@spacemit.com>