Kernel driver lp3944

  • National Semiconductor LP3944 Fun-light 晶片

    字首: ‘lp3944’

    掃描地址: 無 (參見下面的 Notes 部分)

    資料表

    可在 National Semiconductor 網站公開獲取:http://www.national.com/pf/LP/LP3944.html

作者

Antonio Ospite <ospite@studenti.unina.it>

描述

LP3944 是一個輔助晶片,可以驅動多達 8 個 LED,具有兩種可程式設計的 DIM 模式;它甚至可以用作 GPIO 擴充套件器,但該驅動程式假設它用作 LED 控制器。

DIM 模式用於設定 LED 的 _blink_ 模式,模式透過提供兩個引數指定

  • 週期

    從 0 秒到 1.6 秒

  • 佔空比

    LED 亮起的週期百分比,從 0 到 100

將 LED 設定為 DIM0 或 DIM1 模式使其根據該模式閃爍。 有關詳細資訊,請參見資料表。

LP3944 可以在 Motorola A910 智慧手機上找到,它驅動 rgb led、相機閃光燈和 lcd 的電源。

備註

該晶片主要用於嵌入式環境中,因此該驅動程式期望使用 i2c_board_info 機制註冊它。

要在介面卡 0 上的地址 0x60 註冊晶片,請根據 include/linux/leds-lp3944.h 設定平臺數據,設定 i2c 板資訊

static struct i2c_board_info a910_i2c_board_info[] __initdata = {
        {
                I2C_BOARD_INFO("lp3944", 0x60),
                .platform_data = &a910_lp3944_leds,
        },
};

並在平臺初始化函式中註冊它

i2c_register_board_info(0, a910_i2c_board_info,
                ARRAY_SIZE(a910_i2c_board_info));