All of lore.kernel.org
 help / color / mirror / Atom feed
* Consolidating the interface for camera components
@ 2019-12-06 16:50 Philip Molloy
  2019-12-06 17:57 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Molloy @ 2019-12-06 16:50 UTC (permalink / raw)
  To: linux-hotplug

Hello,

I'm trying to consolidate the interface for several camera components into one place to represent a single camera.

Each of the camera modules includes a LED driver (0x63) and camera (0x3c) that sit behind a couple muxes. For example:

/sys/devices/platform/amba/ff030000.i2c/i2c-1/i2c-3/i2c-5/5-003c/
/sys/devices/platform/amba/ff030000.i2c/i2c-1/i2c-3/i2c-7/7-0063/

The LEDs are also available under /sys/class/leds/ based on their labels as defined in the devicetree.

The image data captured by the camera passes through two soft IP blocks. The driver for the second block maps the image into memory and exposes it as a block device in /dev.

In #kernel-newbies on OFC it was suggested that I could use udev to symlink the above into one place in /dev, but I'm having trouble creating a symlink between /sys and /dev (e.g. /sys/.../5-003c -> /dev/camera-name/camera). Perhaps that isn't possible or intended? I've only seen symlinks between /dev and /dev in /usr/lib/udev/rules.d/*.rules on my development system.

If it is I can explain what I've tried in more detail, but basically I'd like to do something like the following:

DRIVER=="aptina-ar0330", SYMLINK+="camera/$attr{../../of_node/name}/$env{OF_NAME}"

If it is not possible any other recommendations would be greatly appreciated.

Best,
Philip

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Consolidating the interface for camera components
  2019-12-06 16:50 Consolidating the interface for camera components Philip Molloy
@ 2019-12-06 17:57 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-12-06 17:57 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Dec 06, 2019 at 04:50:09PM +0000, Philip Molloy wrote:
> Hello,
> 
> I'm trying to consolidate the interface for several camera components into one place to represent a single camera.
> 
> Each of the camera modules includes a LED driver (0x63) and camera (0x3c) that sit behind a couple muxes. For example:
> 
> /sys/devices/platform/amba/ff030000.i2c/i2c-1/i2c-3/i2c-5/5-003c/
> /sys/devices/platform/amba/ff030000.i2c/i2c-1/i2c-3/i2c-7/7-0063/
> 
> The LEDs are also available under /sys/class/leds/ based on their labels as defined in the devicetree.
> 
> The image data captured by the camera passes through two soft IP blocks. The driver for the second block maps the image into memory and exposes it as a block device in /dev.
> 
> In #kernel-newbies on OFC it was suggested that I could use udev to symlink the above into one place in /dev, but I'm having trouble creating a symlink between /sys and /dev (e.g. /sys/.../5-003c -> /dev/camera-name/camera). Perhaps that isn't possible or intended? I've only seen symlinks between /dev and /dev in /usr/lib/udev/rules.d/*.rules on my development system.
> 
> If it is I can explain what I've tried in more detail, but basically I'd like to do something like the following:
> 
> DRIVER="aptina-ar0330", SYMLINK+="camera/$attr{../../of_node/name}/$env{OF_NAME}"
> 
> If it is not possible any other recommendations would be greatly appreciated.

Try asking on the linux-media mailing list as this is the API those
drivers expose.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Consolidating the interface for camera components
@ 2019-12-09  3:02 Philip Molloy
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Molloy @ 2019-12-09  3:02 UTC (permalink / raw)
  To: linux-media

Hello,

I'm trying to consolidate the interface for several camera components into one place to represent a single camera. Note the camera module is a specialized custom device, not a general purpose camera, in case that matters.

Each of the camera modules includes a LED driver (0x63) and camera (0x3c) that sit behind a couple muxes. For example:

/sys/devices/platform/amba/ff030000.i2c/i2c-1/i2c-3/i2c-5/5-003c/
/sys/devices/platform/amba/ff030000.i2c/i2c-1/i2c-3/i2c-7/7-0063/

The LEDs are also available under /sys/class/leds/ based on their labels as defined in the devicetree.

The image data captured by the camera passes through two soft IP blocks. The driver for the second block maps the image into memory and exposes it as a block device in /dev.

Is there a way to consolidate that into one place rather than having it spread across /sys/devices/platform, /sys/class/leds, and /dev?

Best,
Philip




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-09  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 16:50 Consolidating the interface for camera components Philip Molloy
2019-12-06 17:57 ` Greg KH
2019-12-09  3:02 Philip Molloy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.