This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/LP55231: Issues with integrating LP55231 linux device driver

Part Number: LP55231

Tool/software: Linux

Hi All,

I am trying to integrate the LP55231 linux device driver with our ARM based board running openwrt. I am able to see /sys entries but when i try to load firmware i see the following error.

[ 6219.827586] lp5523x 0-0032: Direct firmware load for lp55231 failed with error -2
[ 6219.836484] lp5523x 0-0032: Falling back to user helper

I am trying to load the firmware with the following commands:-

echo 3 > /sys/bus/i2c/devices/0-0032/select_engine
echo 1 > /sys/class/firmware/lp55231/loading
echo "9d0740ff7e0040007e00a0010000" > /sys/class/firmware/lp55231/data
echo 0 > /sys/class/firmware/lp55231/loading
echo "000001100" > /sys/bus/i2c/devices/0-0032/engine3_leds
echo 1 > /sys/bus/i2c/devices/0-0032/run_engine

The following forum https://e2e.ti.com/support/power_management/led_driver/f/192/t/421131 

Can someone help here?

Thanks,

Aravind

  • The following forum e2e.ti.com/.../421131 did not help (pls compare the errors)
  • Hi Aravind,

    I am supporting this device but I am not the expert in Liunx.

    I have some sample code which can works in the Liunx.

    Could you send email to summer-su@ti.com, then I can send it to you for referecne.

    The other hand, I will contact TI internal Liunix expert to look in the issue.

    But I am not sure feedback, it may take 2 weeks.

    Let me know what is your thinking.

    Thanks!

    Summer Su 

  • Aravindhan,

    Did you verify that things mentioned in thread you linked are done in your system?

    1) Kernel built with configuration option CONFIG_FW_LOADER_USER_HELPER=y

    2) You have patched version of led-lp55xx-common.c. Looking at kernel source tree, this patch shows first time in version 4.2. If you have older version, changes are you have to patch the driver by yourself.

    diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
    index f23c315..94b2cda 100644
    --- a/drivers/leds/leds-lp55xx-common.c
    +++ b/drivers/leds/leds-lp55xx-common.c
    @@ -237,7 +237,7 @@ static int lp55xx_request_firmware(struct lp55xx_chip *chip)
         const char *name = chip->cl->name;
         struct device *dev = &chip->cl->dev;
     
    -    return request_firmware_nowait(THIS_MODULE, true, name, dev,
    +    return request_firmware_nowait(THIS_MODULE, false, name, dev,
                     GFP_KERNEL, chip, lp55xx_firmware_loaded);
     }

    Regards,

    Juha

  • Juha,

    These items were taken care.
  • Hi All,

    Identified the issue. The Device tree entry for current setting was very less. Increased the current values and is working fine now.

    And BTW, the error I mentioned in the description was just a warning. There are two methods to load firmware to LP55231 via the linux driver, 1. Firmware should be present in predefined location like /lib/firmware/updates/lp55231,etc . - this is for automatic firmware upgrade. 2. User can provide firmware on the fly at /sys/class/firmware/lp55231.

    If firmware is not available in predefined location, firmware loader falls back to User helper(option 2). Ideally, this is not error, just a info log.

    Regards,
    Aravindhan.