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