|
|
|
Re: [PATCH] Document : Add LED driver for lm3556 chip | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
On Wed, Jun 20, 2012 at 1:27 PM, G.Shark Jeong <gshark.jeong@xxxxxxxxx> wrote:
> From: "G.Shark Jeong" <gshark.jeong@xxxxxxxxx>
>
> LM3556 :
> The LM3556 is a 4 MHz fixed-frequency synchronous boost
> converter plus 1.5A constant current driver for a high-current white LED.
> Datasheet: www.national.com/ds/LM/LM3556.pdf
>
> Signed-off-by: G.Shark Jeong <gshark.jeong@xxxxxxxxx>
Apparently, this patch has some coding style issue. And please fold
this patch with your previous driver patch together and send out as a
whole patch then.
Thanks,
-Bryan
> ---
> Documentation/leds/00-INDEX | 2 +
> Documentation/leds/leds-lm3556.txt | 86 ++++++++++++++++++++++++++++++++++++
> 2 files changed, 88 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/leds/leds-lm3556.txt
>
> diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX
> index 29f481d..5fefe37 100644
> --- a/Documentation/leds/00-INDEX
> +++ b/Documentation/leds/00-INDEX
> @@ -6,3 +6,5 @@ leds-lp5521.txt
> - notes on how to use the leds-lp5521 driver.
> leds-lp5523.txt
> - notes on how to use the leds-lp5523 driver.
> +leds-lm3556.txt
> + - notes on how to use the leds-lm3556 driver.
> diff --git a/Documentation/leds/leds-lm3556.txt b/Documentation/leds/leds-lm3556.txt
> new file mode 100644
> index 0000000..debdf87
> --- /dev/null
> +++ b/Documentation/leds/leds-lm3556.txt
> @@ -0,0 +1,86 @@
> +Kernel driver for lm3556
> +========================
> +
> +*Texas Instrument:
> + 1.5 A Synchronous Boost LED Flash Driver w/ High-Side Current Source
> +* Datasheet: http://www.national.com/ds/LM/LM3556.pdf
> +
> +Authors:
> + Daniel Jeong
> + Contact:Daniel Jeong(daniel.jeong-at-ti.com, gshark.jeong-at-gmail.com)
> +
> +Description
> +-----------
> +There are 3 functions in LM3556, Flash, Torch and Indicator.
> +
> +FLASH MODE
> +In Flash Mode, the LED current source(LED) provides 16 target current levels
> +from 93.75 mA to 1500 mA.The Flash currents are adjusted via the CURRENT
> +CONTROL REGISTER(0x09).Flash mode is activated by the ENABLE REGISTER(0x0A),
> +or by pulling the STROBE pin HIGH.
> +LM3556 Flash can be controlled through sys/class/leds/flash/brightness file
> +* if STROBE pin is enabled, below example control brightness only, and
> +ON / OFF will be controlled by STROBE pin.
> +
> +Flash Example:
> +OFF : #echo 0 > sys/class/leds/flash/brightness
> +93.75 mA: #echo 1 > sys/class/leds/flash/brightness
> +... .....
> +1500 mA: #echo 16 > sys/class/leds/flash/brightness
> +
> +TORCH MODE
> +In Torch Mode, the current source(LED) is programmed via the CURRENT CONTROL
> +REGISTER(0x09).Torch Mode is activated by the ENABLE REGISTER(0x0A) or by the
> +hardware TORCH input.
> +LM3556 torch can be controlled through sys/class/leds/torch/brightness file.
> +* if TORCH pin is enabled, below example control brightness only,
> +and ON / OFF will be controlled by TORCH pin.
> +
> +Torch Example:
> +OFF : #echo 0 > sys/class/leds/torch/brightness
> +46.88 mA: #echo 1 > sys/class/leds/torch/brightness
> +... .....
> +375 mA : #echo 8 > sys/class/leds/torch/brightness
> +
> +INDICATOR MODE
> +Indicater pattern can be set through sys/class/leds/indicator/pattern file,
> +and 4 patterns are pre-defined in indicator_pattern array.
> +According to N-lank, Pulse time and N Period values, different pattern wiill
> +be generated.If you want new patterns for your own device, change
> +indicator_pattern array with your own values and INDIC_PATTERN_SIZE.
> +Please refer datasheet for more detail about N-Blank, Pulse time and N Period.
> +
> +Indicator pattern example:
> +pattern 0: #echo 0 > sys/class/leds/indicator/pattern
> +....
> +pattern 3: #echo 3 > sys/class/leds/indicator/pattern
> +
> +Indicater brightness can be controlled through
> +sys/class/leds/indicator/brightness file.
> +
> +Example:
> +OFF : #echo 0 > sys/class/leds/indicator/brightness
> +5.86 mA : #echo 1 > sys/class/leds/indicator/brightness
> +........
> +46.875mA : #echo 8 > sys/class/leds/indicator/brightness
> +
> +Notes
> +-----
> +Driver expects it is registered using the i2c_board_info mechanism.
> +Toregister the chip at address 0x63 on specific adapter, set the platform data
> + according to include/linux/platform_data/leds-lm3556.h, set the i2c board info:
> +
> +Example:
> + static struct i2c_board_info __initdata board_i2c_ch4[] = {
> + {
> + I2C_BOARD_INFO(LM3556_NAME, 0x63),
> + .platform_data = &lm3556_pdata,
> + },
> + };
> +
> +and register it in the platform init function
> +
> +Example:
> + board_register_i2c_bus(4, 400,
> + board_i2c_ch4, ARRAY_SIZE(board_i2c_ch4));
> +
> --
> 1.7.5.4
>
--
Bryan Wu <bryan.wu@xxxxxxxxxxxxx>
Kernel Developer +86.186-168-78255 Mobile
Canonical Ltd. www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Other Archives] [Linux Kernel Newbies] [Linux Driver Development] [Linux Kbuild] [Fedora Kernel] [Linux Kernel Testers] [Linux SH] [Linux Omap] [Linux Tape] [Linux Input] [Linux Kernel Janitors] [Linux Kernel Packagers] [Linux Doc] [Linux Man Pages] [Linux API] [Linux Memory Management] [Linux Modules] [Linux Standards] [Kernel Announce] [Netdev] [Git] [Linux PCI] Linux CAN Development [Linux I2C] [Linux RDMA] [Linux NUMA] [Netfilter] [Netfilter Devel] [SELinux] [Bugtraq] [FIO] [Linux Perf Users] [Linux Serial] [Linux PPP] [Linux ISDN] [Linux Next] [Kernel Stable Commits] [Linux Tip Commits] [Kernel MM Commits] [Linux Security Module] [AutoFS] [Filesystem Development] [Ext3 Filesystem] [Linux bcache] [Ext4 Filesystem] [Linux BTRFS] [Linux CEPH Filesystem] [Linux XFS] [XFS] [Linux NFS] [Linux CIFS] [Ecryptfs] [Linux NILFS] [Linux Cachefs] [Reiser FS] [Initramfs] [Linux FB Devel] [Linux OpenGL] [DRI Devel] [Fastboot] [Linux RT Users] [Linux RT Stable] [eCos] [Corosync] [Linux Clusters] [LVS Devel] [Hot Plug] [Linux Virtualization] [KVM] [KVM PPC] [KVM ia64] [Linux Containers] [Linux Hexagon] [Linux Cgroups] [Util Linux] [Wireless] [Linux Bluetooth] [Bluez Devel] [Ethernet Bridging] [Embedded Linux] [Barebox] [Linux MMC] [Linux IIO] [Sparse] [Smatch] [Linux Arch] [x86 Platform Driver] [Linux ACPI] [Linux IBM ACPI] [LM Sensors] [CPU Freq] [Linux Power Management] [Linmodems] [Linux DCCP] [Linux SCTP] [ALSA Devel] [Linux USB] [Linux PA RISC] [Linux Samsung SOC] [MIPS Linux] [IBM S/390 Linux] [ARM Linux] [ARM Kernel] [ARM MSM] [Tegra Devel] [Sparc Linux] [Linux Security] [Linux Sound] [Linux Media] [Video 4 Linux] [Linux IRDA Users] [Linux for the blind] [Linux RAID] [Linux ATA RAID] [Device Mapper] [Linux SCSI] [SCSI Target Devel] [Linux SCSI Target Infrastructure] [Linux IDE] [Linux SMP] [Linux AXP] [Linux Alpha] [Linux M68K] [Linux ia64] [Linux 8086] [Linux x86_64] [Linux Config] [Linux Apps] [Linux MSDOS] [Linux X.25] [Linux Crypto] [DM Crypt] [Linux Trace Users] [Linux Btrace] [Linux Watchdog] [Utrace Devel] [Linux C Programming] [Linux Assembly] [Dash] [DWARVES] [Hail Devel] [Linux Kernel Debugger] [Linux gcc] [Gcc Help] [X.Org] [Wine]
![]() |
![]() |
[Older Kernel Discussion] [Yosemite National Park Forum] [Large Format Photos] [Gimp] [Yosemite Photos] [Stuff]