Message ID | 1390892158-5646-1-git-send-email-gshark.jeong@gmail.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1W82bG-00067h-3O; Tue, 28 Jan 2014 07:56:46 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtp id 1W82bE-0006cl-jl; Tue, 28 Jan 2014 07:56:45 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754608AbaA1G4M (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 28 Jan 2014 01:56:12 -0500 Received: from mail-ie0-f169.google.com ([209.85.223.169]:48188 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbaA1G4L (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 28 Jan 2014 01:56:11 -0500 Received: by mail-ie0-f169.google.com with SMTP id to1so2173033ieb.14 for <multiple recipients>; Mon, 27 Jan 2014 22:56:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=uhsMdZ2kZU508NEE6kB7dAOdCkX116SaFK+/Z5d91Qo=; b=Db+GYrh1V3mzQ27Pcb+oPXrCeDH6IzatL4OcYUJd1TDNRwDCOTyYEDs6h84136Cmd8 5abGC51NV904akRAweAleN2K3PgOgs0Xz2nA1Wfu49stYANqKClmy7LZ9CRHmKjzKB6Q QkBQo8KrU2g6HKpZl5YvERULH6CPxMR/QLO+C4h5rLq5JUMZevaQT2HhTupl7cX/F3VC l/nLkUBPs8fTEeUw5bVGoe59yTlKgZ97VXp5/G2HBdTtfaT1ZgGOAS3CLeZSRNy2F+Ck +UpWbJc2yKuhf1iUO3tqh69K2Swt9CjOCSbaqG0eYQ8VEkvU8rtQAxewIAErAhkN2zoK pZcw== X-Received: by 10.50.66.208 with SMTP id h16mr26081855igt.0.1390892170849; Mon, 27 Jan 2014 22:56:10 -0800 (PST) Received: from localhost.localdomain ([117.111.4.239]) by mx.google.com with ESMTPSA id fk5sm53468997igb.9.2014.01.27.22.56.07 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 22:56:10 -0800 (PST) From: Daniel Jeong <gshark.jeong@gmail.com> To: Mauro Carvalho Chehab <m.chehab@samsung.com>, Sakari Ailus <sakari.ailus@iki.fi>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Hans Verkuil <hans.verkuil@cisco.com>, Daniel Jeong <gshark.jeong@gmail.com>, <linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org> Subject: [RFCv2,1/2] v4l2-controls.h: add addtional Flash fault bits Date: Tue, 28 Jan 2014 15:55:57 +0900 Message-Id: <1390892158-5646-1-git-send-email-gshark.jeong@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.1.28.64515 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1400_1499 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Commit Message
Daniel Jeong
Jan. 28, 2014, 6:55 a.m. UTC
Add additional FLASH Fault bits to dectect faults from chip.
Some Flash drivers support UVLO, IVFM, NTC Trip faults.
UVLO : Under Voltage Lock Out Threshold crossed
IVFM : IVFM block reported and/or adjusted LED current Input Voltage Flash Monitor trip threshold
NTC : NTC Threshold crossed. Many Flash drivers have a pin and the fault bit to
serves as a threshold detector for negative temperature coefficient (NTC) thermistors.
Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com>
---
include/uapi/linux/v4l2-controls.h | 3 +++
1 file changed, 3 insertions(+)
Comments
On 01/28/2014 07:55 AM, Daniel Jeong wrote: > Add additional FLASH Fault bits to dectect faults from chip. > Some Flash drivers support UVLO, IVFM, NTC Trip faults. > UVLO : Under Voltage Lock Out Threshold crossed > IVFM : IVFM block reported and/or adjusted LED current Input Voltage Flash Monitor trip threshold > NTC : NTC Threshold crossed. Many Flash drivers have a pin and the fault bit to > serves as a threshold detector for negative temperature coefficient (NTC) thermistors. Please document these new flags as well in Documentation/DocBook/media/v4l/controls.xml. Regards, Hans > > Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> > --- > include/uapi/linux/v4l2-controls.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h > index 1666aab..01d730c 100644 > --- a/include/uapi/linux/v4l2-controls.h > +++ b/include/uapi/linux/v4l2-controls.h > @@ -803,6 +803,9 @@ enum v4l2_flash_strobe_source { > #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) > #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) > #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) > +#define V4L2_FLASH_FAULT_UVLO (1 << 6) > +#define V4L2_FLASH_FAULT_IVFM (1 << 7) > +#define V4L2_FLASH_FAULT_NTC_TRIP (1 << 8) > > #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) > #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Daniel, On Tue, Jan 28, 2014 at 03:55:57PM +0900, Daniel Jeong wrote: > Add additional FLASH Fault bits to dectect faults from chip. > Some Flash drivers support UVLO, IVFM, NTC Trip faults. > UVLO : Under Voltage Lock Out Threshold crossed > IVFM : IVFM block reported and/or adjusted LED current Input Voltage Flash Monitor trip threshold > NTC : NTC Threshold crossed. Many Flash drivers have a pin and the fault bit to > serves as a threshold detector for negative temperature coefficient (NTC) thermistors. > > Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> > --- > include/uapi/linux/v4l2-controls.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h > index 1666aab..01d730c 100644 > --- a/include/uapi/linux/v4l2-controls.h > +++ b/include/uapi/linux/v4l2-controls.h > @@ -803,6 +803,9 @@ enum v4l2_flash_strobe_source { > #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) > #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) > #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) > +#define V4L2_FLASH_FAULT_UVLO (1 << 6) > +#define V4L2_FLASH_FAULT_IVFM (1 << 7) > +#define V4L2_FLASH_FAULT_NTC_TRIP (1 << 8) I object adding a new fault which is essentially the same as an existing fault, V4L2_FLASH_FAULT_OVER_TEMPERATURE. As the practice has been to use human-readable names for the faults, I'd also suggest using V4L2_FLASH_FAULT_UNDER_VOLTAGE instead of V4L2_FLASH_FAULT_UVLO. What's the IVFM block and what does it do? > #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) > #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
2014? 01? 28? 18:08, Sakari Ailus ? ?: > Hi Daniel, > > On Tue, Jan 28, 2014 at 03:55:57PM +0900, Daniel Jeong wrote: >> Add additional FLASH Fault bits to dectect faults from chip. >> Some Flash drivers support UVLO, IVFM, NTC Trip faults. >> UVLO : Under Voltage Lock Out Threshold crossed >> IVFM : IVFM block reported and/or adjusted LED current Input Voltage Flash Monitor trip threshold >> NTC : NTC Threshold crossed. Many Flash drivers have a pin and the fault bit to >> serves as a threshold detector for negative temperature coefficient (NTC) thermistors. >> >> Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> >> --- >> include/uapi/linux/v4l2-controls.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h >> index 1666aab..01d730c 100644 >> --- a/include/uapi/linux/v4l2-controls.h >> +++ b/include/uapi/linux/v4l2-controls.h >> @@ -803,6 +803,9 @@ enum v4l2_flash_strobe_source { >> #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) >> #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) >> #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) >> +#define V4L2_FLASH_FAULT_UVLO (1 << 6) >> +#define V4L2_FLASH_FAULT_IVFM (1 << 7) >> +#define V4L2_FLASH_FAULT_NTC_TRIP (1 << 8) > I object adding a new fault which is essentially the same as an existing > fault, V4L2_FLASH_FAULT_OVER_TEMPERATURE. I hope you consider it again. Usually, when the die temperature exceeds the specific temperature, ie 120 or 135 and fixed value, turn off PFET,NFET, current sources and set TEMP Fault bit. But in the NTC mode, the comparator is working and detect selected temperature through Vtrip value. It protects shutdown the chip due to high voltage and keep the device operation. Many flash chip support NTC and TEMP Fault both. For example, LM3554, LM3556, LM3559 LM3642, LM3646, LM3560, LM3561, LM3565 etc Two things should be tell apart. > > As the practice has been to use human-readable names for the faults, I'd > also suggest using V4L2_FLASH_FAULT_UNDER_VOLTAGE instead of > V4L2_FLASH_FAULT_UVLO. I agree with you. > > What's the IVFM block and what does it do? IVFM is Input Voltage Flash Monitor. If the flash chip has IVFM function the flash current can be adjusted based upon the voltage level of input. As ramping flash current, the input voltage goes down and IVFM block adjust current to prevent to shudown due to low voltage and keep the flash operation. So if the input voltage crossed the IVFM Threshold level chip set the fault bit. Many flash chip, for example LM3556, LM3646, LM3642 , support this fucntion. I think, V4L2_FLASH_FAULT_INPUT_VOLTAGE_MONITOR is better than V4L2_FLASH_FAULT_IVFM. > >> #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) >> #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Daniel, On Tue, Jan 28, 2014 at 07:19:04PM +0900, Daniel Jeong wrote: > 2014? 01? 28? 18:08, Sakari Ailus ? ?: > >Hi Daniel, > > > >On Tue, Jan 28, 2014 at 03:55:57PM +0900, Daniel Jeong wrote: > >>Add additional FLASH Fault bits to dectect faults from chip. > >>Some Flash drivers support UVLO, IVFM, NTC Trip faults. > >>UVLO : Under Voltage Lock Out Threshold crossed > >>IVFM : IVFM block reported and/or adjusted LED current Input Voltage Flash Monitor trip threshold > >>NTC : NTC Threshold crossed. Many Flash drivers have a pin and the fault bit to > >>serves as a threshold detector for negative temperature coefficient (NTC) thermistors. > >> > >>Signed-off-by: Daniel Jeong <gshark.jeong@gmail.com> > >>--- > >> include/uapi/linux/v4l2-controls.h | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >>diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h > >>index 1666aab..01d730c 100644 > >>--- a/include/uapi/linux/v4l2-controls.h > >>+++ b/include/uapi/linux/v4l2-controls.h > >>@@ -803,6 +803,9 @@ enum v4l2_flash_strobe_source { > >> #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) > >> #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) > >> #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) > >>+#define V4L2_FLASH_FAULT_UVLO (1 << 6) > >>+#define V4L2_FLASH_FAULT_IVFM (1 << 7) > >>+#define V4L2_FLASH_FAULT_NTC_TRIP (1 << 8) > >I object adding a new fault which is essentially the same as an existing > >fault, V4L2_FLASH_FAULT_OVER_TEMPERATURE. > > I hope you consider it again. > Usually, when the die temperature exceeds the specific temperature, ie 120 or 135 and fixed value, > turn off PFET,NFET, current sources and set TEMP Fault bit. > But in the NTC mode, the comparator is working and detect selected temperature through Vtrip value. > It protects shutdown the chip due to high voltage and keep the device operation. > Many flash chip support NTC and TEMP Fault both. For example, LM3554, LM3556, LM3559 > LM3642, LM3646, LM3560, LM3561, LM3565 etc > Two things should be tell apart. Ah, after looking at the specs I now understand what you do mean. This is about the temperature of the LED, not the flash controller chip itself. The actual implementation appears to be an NTC resistor. How about V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE? > >As the practice has been to use human-readable names for the faults, I'd > >also suggest using V4L2_FLASH_FAULT_UNDER_VOLTAGE instead of > >V4L2_FLASH_FAULT_UVLO. > > I agree with you. > > > > >What's the IVFM block and what does it do? > > IVFM is Input Voltage Flash Monitor. > If the flash chip has IVFM function the flash current can be adjusted based upon the voltage level of input. > As ramping flash current, the input voltage goes down and IVFM block adjust current to prevent to shudown due to low voltage > and keep the flash operation. So if the input voltage crossed the IVFM Threshold level chip set the fault bit. > Many flash chip, for example LM3556, LM3646, LM3642 , support this fucntion. > I think, V4L2_FLASH_FAULT_INPUT_VOLTAGE_MONITOR is better than V4L2_FLASH_FAULT_IVFM. What would you think of V4L2_FLASH_FAULT_INPUT_VOLTAGE? "Input voltage monitor" looks like a chip specific term; another chip could well use something else.
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 1666aab..01d730c 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -803,6 +803,9 @@ enum v4l2_flash_strobe_source { #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) +#define V4L2_FLASH_FAULT_UVLO (1 << 6) +#define V4L2_FLASH_FAULT_IVFM (1 << 7) +#define V4L2_FLASH_FAULT_NTC_TRIP (1 << 8) #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)