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

OV5647 kernel driver/overlay tweaks #2686

Merged
merged 2 commits into from Sep 18, 2018

Conversation

Projects
None yet
2 participants
@6by9
Contributor

6by9 commented Sep 18, 2018

It seems that I asked for an old set of DT changes to be merged for setting up the camera GPIOs resulting in it not working with the OV5647 where we need to power up the sensor (TC358743 and ADV7282 don't bother).
I've amended the DT patches appropriately and confirmed it works on a 3B+. On doing that I found that the kernel objected because the driver was calling gpiod_set_value on a GPIO controller that can sleep. There's therefore a driver patch to call gpiod_set_value_cansleep instead (which probably ought to be the default for all media drivers in this use case).

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=222851

@pelwell

This comment has been minimized.

Show comment
Hide comment
@pelwell

pelwell Sep 18, 2018

Contributor

Since cam0-led and cam0-pwdn are no longer user-accessible parameters, can you remove them from the README?

Contributor

pelwell commented Sep 18, 2018

Since cam0-led and cam0-pwdn are no longer user-accessible parameters, can you remove them from the README?

6by9 added some commits Sep 18, 2018

dtoverlays: Correct DT handling camera GPIOs
The firmware has support for updating overrides with the correct
GPIO settings for the camera GPIOs, but the wrong device tree
setup ended up being merged.
Correct the DT configuration so that the firmware does set it
up correctly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
media: ov5647: Use gpiod_set_value_cansleep
All calls to the gpio library are in contexts that can sleep,
therefore there is no issue with having those GPIOs controlled
by controllers which require sleeping (eg I2C GPIO expanders).

Switch to using gpiod_set_value_cansleep instead of gpiod_set_value
to avoid triggering the warning in gpiolib should the GPIO
controller need to sleep.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
@6by9

This comment has been minimized.

Show comment
Hide comment
@6by9

6by9 Sep 18, 2018

Contributor

Since cam0-led and cam0-pwdn are no longer user-accessible parameters, can you remove them from the README?

Done.

Contributor

6by9 commented Sep 18, 2018

Since cam0-led and cam0-pwdn are no longer user-accessible parameters, can you remove them from the README?

Done.

@pelwell pelwell merged commit 675e29f into raspberrypi:rpi-4.14.y Sep 18, 2018

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 18, 2018

kernel: Bluetooth: hci_ldisc: Free rw_semaphore on close
See: raspberrypi/linux#2681

kernel: OV5647 kernel driver/overlay tweaks
See: raspberrypi/linux#2686

kernel: BCM270X_DT: Add gpio-fan overlay

popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Sep 18, 2018

kernel: Bluetooth: hci_ldisc: Free rw_semaphore on close
See: raspberrypi/linux#2681

kernel: OV5647 kernel driver/overlay tweaks
See: raspberrypi/linux#2686

kernel: BCM270X_DT: Add gpio-fan overlay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment