Thread (4 messages) 4 messages, 3 authors, 2018-06-20

Re: [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling

flat view

From: Vinod <vkoul@kernel.org>
Date: 2018-06-20 05:47:36
Also in: dri-devel, linux-arm-msm, linux-leds, lkml

On 19-06-18, 16:43, Kiran Gunda wrote:
quoted hunk ↗ jump to hunk
 struct wled {
 	const char *name;
 	struct device *dev;
 	struct regmap *regmap;
+	struct mutex lock;	/* Lock to avoid race from ISR */
the comment is wrong as you avoid race with thread handler and not the
main ISR. The ISR runs in atomic context so you cant use a mutex but you
may do so with a thread handler
quoted hunk ↗ jump to hunk
+#define WLED_SHORT_DLY_MS			20
+#define WLED_SHORT_CNT_MAX			5
+#define WLED_SHORT_RESET_CNT_DLY_US		USEC_PER_SEC
an empty line after defines would be better
quoted hunk ↗ jump to hunk
+static int wled_configure_short_irq(struct wled *wled,
+				    struct platform_device *pdev)
+{
+	int rc = 0, short_irq;
superfluous initialization of rc

-- 
~Vinod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help