Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leds: pca963x: Broken open-drain initialization #3274

Closed
majorz opened this issue Oct 9, 2019 · 5 comments
Closed

leds: pca963x: Broken open-drain initialization #3274

majorz opened this issue Oct 9, 2019 · 5 comments
Labels
Waiting for external input Waiting for a comment from the originator of the issue, or a collaborator.

Comments

@majorz
Copy link
Contributor

majorz commented Oct 9, 2019

When the pca963x driver is initialized in open-drain mode it does not set properly the OUTDRV setting (bit 2) of the Mode register 2. Instead of setting bit 2 to 0 the driver keeps it as 1.

The issue was introduced in bb29b9c ("leds: pca963x: Add bindings to invert polarity").

I have a small patch ready that fixes this and it looks like it should go into the mainline kernel first. I have a basic understanding of the principles in submitting patches for the mainline kernel, but I am struggling with the steps necessary upstreaming it, so that it gets on a Raspbian release sooner (not when Raspbian catches up with the mainline).

Will adding Cc: stable@vger.kernel.org in the sign-off area of the patch be enough for this?

I will appreciate any advice on what is necessary to propagate the patch to the right place and proper way.

@pelwell
Copy link
Contributor

pelwell commented Oct 9, 2019

A "Fixes: " tag is a good way to ensure it gets back-ported to stable branches, but in general we're happy to back-port any (working) commit into earlier kernels from the moment it gets merged into linux-next.

@majorz
Copy link
Contributor Author

majorz commented Oct 9, 2019

Awesome, thanks a lot! I will follow up once it progresses further.

@JamesH65 JamesH65 added the Waiting for external input Waiting for a comment from the originator of the issue, or a collaborator. label Oct 18, 2019
@majorz
Copy link
Contributor Author

majorz commented Jan 7, 2020

Hi @pelwell, the patch landed on linux-next. Would it be possible for it to be incorporated here, so that it gets included in an upcoming Raspbian release?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/leds/leds-pca963x.c?id=697529091ac7a0a90ca349b914bb30641c13c753

@pelwell
Copy link
Contributor

pelwell commented Jan 7, 2020

No problem - it's in rpi-4.19.y and rpi-5.4.y now.

@majorz
Copy link
Contributor Author

majorz commented Jan 7, 2020

Awesome, thank you so much!

@majorz majorz closed this as completed Jan 7, 2020
popcornmix added a commit to raspberrypi/firmware that referenced this issue Jan 10, 2020
kernel: leds: pca963x: Fix open-drain initialization
See: raspberrypi/linux#3274

kernel: add BME680 to i2c-sensor overlay
See: raspberrypi/linux#3400

kernel: Pisound: MIDI communication fixes for scaled down CPU
See: raspberrypi/linux#3396

kernel: pinctrl: bcm2835: Change init order for gpio hogs
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600

firmware: Revert mmal: Support 64 bit clients
See: raspberrypi/userland#586

firmware: arm_dt/dtoverlay fixes for ARM side camera driver power control
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jan 10, 2020
kernel: leds: pca963x: Fix open-drain initialization
See: raspberrypi/linux#3274

kernel: add BME680 to i2c-sensor overlay
See: raspberrypi/linux#3400

kernel: Pisound: MIDI communication fixes for scaled down CPU
See: raspberrypi/linux#3396

kernel: pinctrl: bcm2835: Change init order for gpio hogs
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600

firmware: Revert mmal: Support 64 bit clients
See: raspberrypi/userland#586

firmware: arm_dt/dtoverlay fixes for ARM side camera driver power control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for external input Waiting for a comment from the originator of the issue, or a collaborator.
Projects
None yet
Development

No branches or pull requests

3 participants