t; Sorry for inconvenience.
No worries; thanks for the fix!
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
9v111: Fix v4l2-ctrl error handling
drivers/media/i2c/mt9v111.c | 41 +
1 file changed, 13 insertions(+), 28 deletions(-)
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
ver's probe() function; doing the same here seems
redundant. Just checking ret and failing if it's non-zero should suffice:
if (ret)
return ret;
Let me know if you'd like to respin; I can do that as well.
>
> expmin = EXPOS_MIN_MS * info->pdata->clk_rate /
it later if there's
a need to e.g. do something differently for the N900 IR transmitter.
It'd be nice if someone tested it, too...
> { .compatible = "pwm-ir-tx", },
> { },
> };
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
On Thu, Aug 30, 2018 at 01:51:39PM +0200, Hans Verkuil wrote:
> On 08/30/2018 12:15 PM, Sakari Ailus wrote:
> > Hi Hans,
> >
> > Thanks a lot for working on this!
> >
> > On Tue, Aug 28, 2018 at 03:49:10PM +0200, Hans Verkuil wrote:
> >> From: H
: ov772x: use SCCB regmap
media: ov9650: use SCCB regmap
Alexey Khoroshilov (1):
media: ov772x: Disable clk on error path
Hugues Fruchet (1):
media: ov5640: fix mode change regression
Sakari Ailus (2):
ov5670, ov13858: Use pm_runtime_idle
i2c: Fix
Ping?
On Mon, Jul 23, 2018 at 01:50:38PM +0300, Sakari Ailus wrote:
> Add the DT binding documentation for dw9714 and dw9807-vcm to the
> MAINTAINERS file. The dw9807-vcm binding documentation file is renamed to
> match the dw9807's VCM bit's compatible string.
>
> Si
n ERR_PTR(-EPERM);
> + return ERR_PTR(-EACCES);
>
> filp = fget(request_fd);
> if (!filp)
> @@ -405,7 +405,7 @@ int media_request_object_bind(struct media_request *req,
> int ret = -EBUSY;
>
> if (WARN_ON(!ops->release))
> - return -EPERM;
> + return -EACCES;
>
> spin_lock_irqsave(&req->lock, flags);
>
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
Hi Steve,
On Tue, Aug 28, 2018 at 05:53:51PM -0700, Steve Longerbeam wrote:
> Hi Sakari,
>
>
> On 08/27/2018 02:29 AM, Sakari Ailus wrote:
> > Hello everyone,
> >
> > I've long thought the V4L2 fwnode framework requires some work (it's buggy
> >
driver or the module while omitting the
device's I²C address and bus, leaving the devices with a static name and
effectively limiting the number of such devices in a media device to 1.
Address this by using the name set by the V4L2 framework.
Signed-off-by: Sakari Ailus
---
Hi,
I'm a bit
brings no functional change.
Sakari Ailus (3):
v4l: subdev: Add a function to set an I²C sub-device's name
smiapp: Use v4l2_i2c_subdev_set_name
v4l: sr030pc30: Remove redundant setting of sub-device name
drivers/media/i2c/smiapp/smiapp-core.c | 10 --
drivers/media/i2c/sr030p
Use v4l2_i2c_subdev_set_name() to set the name of the smiapp driver's
sub-devices. There is no functional change.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/smiapp/smiapp-core.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/media/i2c/smiapp/s
v4l2_i2c_subdev_set_name() can be used to assign a name to a sub-device.
This way uniform names can be formed easily without having to resort to
things such as snprintf in drivers.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-common.c | 18 ++
include/media/v4l2
The sub-device name is set right after in v4l2_i2c_subdev_init(). Remove
the redundant strcpy() call.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/sr030pc30.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/i2c/sr030pc30.c b/drivers/media/i2c/sr030pc30.c
index 2a4882cddc51
user space compiling with it.
>
> By the way, I wonder if this is the right approach for controlling the
> layout of ABI structs. I don't see many headers using any alignment in
> uapi/ in general. Perhaps explicit padding bytes would be more
> appropriate? They are also less tricky when one structure needs to be
> embedded inside two or more different structures with different
> alignments, which can't be done easily if you specify __aligned() on
> the child struct.
One of the reasons there are not so many are probably what you just
elaborated above. That said, there are a few points to note here:
- the alignment is generally the same here as it's due to DMA word size
AFAIK,
- the device can be only found in an Intel SoC which limits the
architectures where the driver can actually be used to x86, 64- or
32-bit.
Together these should in theory make if fairly safe. Padding in principle
would be more explicit way to force struct memory layout without relying so
much on the compiler doing the right thing but it'll lead to a *lot* of
reserved fields, which I think is likely one of the reasons why it didn't
catch up back then --- I've suggested it earlier.
FWIW, the rest of the uAPI headers appear to be using
__attribute__((aligned(x))).
--
Regards,
Sakari Ailus
sakari.ai...@linux.intel.com
and Bt.656 interfaces but the means to pass that
information to software wasn't there.
Autodetection (value 0) is removed as an option as the property could be
simply omitted in that case.
Signed-off-by: Sakari Ailus
---
Documentation/devicetree/bindings/media/video-interfaces.txt | 4 +++-
1
Only assign endpoint configuration if the endpoint is parsed successfully.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers
Use fwnode_graph_for_each_endpoint iterator for better readability.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media
Make use of the default CSI-2 lane mapping from caller-passed
configuration.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media
Add support for parsing CSI-2 D-PHY, parallel or Bt.656 bus explicitly.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 53 ---
1 file changed, 43 insertions(+), 10 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b
types.
Default to Bt.656 if no properties suggesting a bus type are found.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 31 +--
include/media/v4l2-mediabus.h | 2 ++
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/dr
Add definitions corresponding to DT bindings to the CSI-2 D-PHY, parallel
and Bt.656 busses.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2
Print debug info as standard V4L2 endpoint are parsed.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 108 ++
1 file changed, 85 insertions(+), 23 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2
The caller may provide default flags for the endpoint. Change the
configuration based on what is available through the fwnode property API.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers
Parsing the graph endpoint is always successful; therefore parse it as
last.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2
Use the media bus types instead of the fwnode bus types internally. This
is the interface to the drivers as well, making the use of the fwnode bus
types more localised to the V4L2 fwnode framework.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 100
Instead of opportunistically trying to gather some information from the
V4L2 endpoint, set the bus type and let the V4L2 fwnode framework figure
out the configuration.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/smiapp/smiapp-core.c | 6 ++
1 file changed, 6 insertions(+)
diff --git
Most hardware doesn't support re-mapping of the CSI-2 lanes. Especially
sensor drivers have a default number of lanes. Instead of requiring the
caller (the driver) to provide such a unit mapping, provide one if no
mapping is configured.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2
Instead of allocating the V4L2 fwnode endpoint in
v4l2_fwnode_endpoint_alloc_parse, let the caller to do this. This allows
setting default parameters for the endpoint which is a very common need
for drivers.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/ov2659.c | 14
Print bus type either as set by the driver or as parsed from the bus-type
property, as well as the guessed V4L2 media bus type.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 38 +++
1 file changed, 38 insertions(+)
diff --git a/drivers
The V4L2 fwnode framework only parsed CSI-2 D-PHY endpoints while C-PHY
support wasn't there. Also parse endpoints for media bus type
V4L2_MBUS_CSI2_CPHY.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
rwise are set. In v1 and error was returned, which would
have been troublesome for the existing drivers.
- Set the bus_type field to zero (i.e. guess) for existing callers of
v4l2_fwnode_endpoint_(alloc_)parse.
- Improved documentation for v4l2_fwnode_endpoint_parse and
v4l2_fwnode_endpoint_a
In order to prepare for allowing drivers to set the defaults for a given
bus, make zeroing the struct conditional based on detecting the bus.
All callers now set the bus type to zero which allows only zeroing the
remaining bus union.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2
The CSI-2 bus may use either D-PHY or C-PHY. Make this visible in media
bus enum.
Signed-off-by: Sakari Ailus
---
drivers/gpu/ipu-v3/ipu-csi.c | 2 +-
drivers/media/i2c/adv7180.c | 2 +-
drivers/media/i2c/ov5640.c | 4 ++--
drivers
The semantics of v4l2_fwnode_endpoint_parse() and
v4l2_fwnode_endpoint_alloc_parse() have changed slightly: they now take
the bus type from the user as well as a default configuration for the bus
that shall reflect the DT binding defaults. Document this.
Signed-off-by: Sakari Ailus
---
include
Read the lane inversion independently of whether the "data-lanes" property
exists. This makes sense since the caller may pass the number of lanes as
the default configuration while the lane inversion configuration may still
be available in firmware.
Signed-off-by: Sakari Ailus
---
dri
with what's in DT. Also return -ENXIO if bus type detection failed to
separate this from the rest of the errors.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 27 +++
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/drivers/
-by: Sakari Ailus
---
drivers/media/i2c/adv7604.c | 2 +-
drivers/media/i2c/mt9v032.c | 2 +-
drivers/media/i2c/ov5647.c| 2 +-
drivers/media/i2c/ov7670.c| 2 +-
drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 +-
drivers
The continuous clock flag was only set if there was a clock or data lanes.
This isn't needed as such a configuration is invalid to begin with. Always
set the continuous clock flag if the non-continuous property is not found.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwn
On Tue, Aug 14, 2018 at 04:20:36PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Make vb2_buffer a request object.
>
> Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
>
> Signed-off-by: Hans Verkuil
> Reviewed-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
.
>
> If a buffer is stored in a request, but not yet queued to the
> driver, then V4L2_BUF_FLAG_IN_REQUEST is set.
>
> Signed-off-by: Hans Verkuil
> Reviewed-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
ver, that this is not the best time for taking
> such discussions, as several core developers will be taking
> vacations those days.
I marked the patch obsoleted for now --- the controls available are
dependent on the pipeline and the pipeline may change, leading the handler
pointing to a different device's control handler.
I certainly have no problems in doing this in principle, but it cannot
currently be done safely nor correctly in the kernel in many cases. As the
controls available in the video node, in general case, would comprise of
controls from several different devices, and thus several different control
handlers, there may well be duplicates and in this case the kernel would
have no clue what to do in such a case.
In user space you can have policies that could be applied in such a case;
the kernel just provides an interface to the hardware, effectively.
Regarding this topic --- there's work beginning towards supporting complex
cameras in Linux and this particular matter belongs to the same problem
area.
--
Kind regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
* computes the necessary out_clock frequency. The ext_clock / out_clock
> * ratio is then approximated with n / m within their respective bounds.
> * For each parameter choice, the preconditions must be rechecked,
> * because integer rounding errors may result in violating some of the
> * preconditions. The parameter set with the least frequency error is
> * returned.
> */
>
> Is this what you are looking for?
>
> Helmut
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
On Tue, Aug 14, 2018 at 04:20:19PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Add a simple helper function that tests if the driver supports
> the request API.
>
> Signed-off-by: Hans Verkuil
> Reviewed-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
--
ensor->pix_clock = pdata->pix_clock;
> + sensor->pix_clock = pll.pix_clock;
>
> ret = mt9m032_write(client, MT9M032_PLL_CONFIG1,
> (pll.m << MT9M032_PLL_CONFIG1_MUL_SHIFT) |
> @@ -711,6 +711,7 @@ static int mt9m032_probe(struct i2c_client *client,
> struct mt9m032_platform_data *pdata = client->dev.platform_data;
> struct i2c_adapter *adapter = client->adapter;
> struct mt9m032 *sensor;
> + struct v4l2_ctrl *pixel_rate_ctrl;
> int chip_version;
> int ret;
>
> @@ -780,9 +781,10 @@ static int mt9m032_probe(struct i2c_client *client,
> V4L2_CID_EXPOSURE, MT9M032_SHUTTER_WIDTH_MIN,
> MT9M032_SHUTTER_WIDTH_MAX, 1,
> MT9M032_SHUTTER_WIDTH_DEF);
> - v4l2_ctrl_new_std(&sensor->ctrls, &mt9m032_ctrl_ops,
> - V4L2_CID_PIXEL_RATE, pdata->pix_clock,
> - pdata->pix_clock, 1, pdata->pix_clock);
> + pixel_rate_ctrl = v4l2_ctrl_new_std(&sensor->ctrls, &mt9m032_ctrl_ops,
> + V4L2_CID_PIXEL_RATE,
> + pdata->pix_clock, pdata->pix_clock,
> + 1, pdata->pix_clock);
>
> if (sensor->ctrls.error) {
> ret = sensor->ctrls.error;
> @@ -810,6 +812,11 @@ static int mt9m032_probe(struct i2c_client *client,
> goto error_entity;
> usleep_range(1, 11000);
>
> + ret = __v4l2_ctrl_modify_range(pixel_rate_ctrl, sensor->pix_clock,
> +sensor->pix_clock, 1, sensor->pix_clock);
> + if (ret < 0)
> + goto error_entity;
> +
> ret = v4l2_ctrl_handler_setup(&sensor->ctrls);
> if (ret < 0)
> goto error_entity;
> --
> 2.11.0
>
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
s://en.wikipedia.org/wiki/Interval_(mathematics)>
>
> Yet, you're listing from 2^3 to 2^7, and that's confusing. Perhaps
> you want to say, instead, that the valid values are at the 3..7 range?
> If so, please use something like "values at the [3..7] range".
I'd prefer either 3..7 or [3, 7], but the latter is formal. Whether a range
is closed or (partially) open matters less with integers though.
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
;
> > FYI, VIDIOC_G_(EXT_)CTRL returns EINVAL if an unsupported control is
> > queried, so if we decided to keep the "cache" functionality after all,
> > perhaps we should stay consistent with it?
> > Reference:
> > https://www.kernel.org/doc/html/latest/media/uapi/v4l/vidioc-g-ext-ctrls.html#return-value
> >
> > My suggestion would be:
> > - EINVAL: the control was not in the request, (if we keep the cache
> > functionality)
> > - EPERM: the value is not ready, (we selected this code for Decoder
> > Interface to mean that CAPTURE format is not ready, which is similar;
> > perhaps that could be consistent?)
> >
> > Note that EINVAL would only apply to writable controls, while EPERM
> > only to volatile controls, since the latter can only change due to
> > request completion (non-volatile controls can only change as an effect
> > of user space action).
> >
>
> I'm inclined to just always return EPERM when calling G_EXT_CTRLS for
> a request. We can always relax this in the future.
>
> So when a request is not yet queued G_EXT_CTRLS returns EPERM, when
> queued but not completed it returns EBUSY and once completed it will
> work as it does today.
It may not be trivial to figure out the state of the request when a control
is being accessed. Besides, it could conceivably change during the IOCTL call.
How about just using EPERM (or EBUSY) in all cases?
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
ent for just ignoring it is that older kernels that do not know
> about
>this flag will ignore it as well. There is no check against unknown flags.
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
Hi Rob,
On Thu, Aug 16, 2018 at 07:48:24AM -0600, Rob Herring wrote:
> On Thu, Aug 16, 2018 at 3:17 AM Sakari Ailus
> wrote:
> >
> > Ping?
> >
> > On Wed, Aug 01, 2018 at 02:16:27PM +0300, Sakari Ailus wrote:
> > > Hi Rob,
> > >
> > > Than
Ping?
On Wed, Aug 01, 2018 at 02:16:27PM +0300, Sakari Ailus wrote:
> Hi Rob,
>
> Thanks for the review.
>
> On Tue, Jul 31, 2018 at 03:32:10PM -0600, Rob Herring wrote:
> > On Mon, Jul 23, 2018 at 04:46:50PM +0300, Sakari Ailus wrote:
> > > Allow specifying the
Hi,
On Tue, Aug 14, 2018 at 10:30:14AM +0300, Laurent Pinchart wrote:
> Hi Helmut,
>
> (CC'ing Sakari Ailus who is our current PLL expert after spending so much
> time
> on the SMIA PLL code)
>
> On Tuesday, 14 August 2018 09:35:40 EEST Helmut Grohne wrote:
> >
l2_device_register_subdev(struct v4l2_device
> *v4l2_dev,
> #endif
> error_module:
> if (!sd->owner_v4l2_dev)
> - module_put(sd->owner);
> + module_put(v4l2_dev->dev->driver->owner);
> sd->v4l2_dev = NULL;
> return err;
> }
> @@ -318,6 +319,6 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
> #endif
> video_unregister_device(sd->devnode);
> if (!sd->owner_v4l2_dev)
> - module_put(sd->owner);
> + module_put(v4l2_dev->dev->driver->owner);
> }
> EXPORT_SYMBOL_GPL(v4l2_device_unregister_subdev);
> --
> 2.18.0
>
--
Sakari Ailus
sakari.ai...@linux.intel.com
Hi Jacopo,
On Fri, Aug 10, 2018 at 12:38:57PM +0200, jacopo mondi wrote:
> Hi Sakari,
>thanks for this nice rework
>
> On Mon, Jul 23, 2018 at 04:46:45PM +0300, Sakari Ailus wrote:
> > Hello everyone,
> >
> > I've long thought the V4L2 fwnode framework req
08-04 01:05:44 +0300)
Jacopo Mondi (1):
media: i2c: mt9v111: Fix v4l2-ctrl error handling
drivers/media/i2c/mt9v111.c | 41 +
1 file changed, 13 insertions(+), 28 deletions(-)
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
Print more error log during error handling.
> -- Remove mutex_destroy() from imx208_free_controls().
> -- Add more comments.
> since v3:
> -- Set explicit indices to link frequencies.
Could you add support for obtaining the link frequencies from firmware,
please?
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
On Fri, Aug 03, 2018 at 03:46:32PM +0200, Philippe De Muyter wrote:
> Hi Sakari,
>
> On Fri, Aug 03, 2018 at 03:43:15PM +0300, Sakari Ailus wrote:
> > Hi Philippe,
> >
> > On Wed, Aug 01, 2018 at 11:20:57PM +0200, Philippe De Muyter wrote:
> > > When v4l2
the effect of this on the actual
sub-device (and entity) names? Looking at i2c_dev_set_name(), this will be
different. We can't change the existing entity naming in drivers, this will
break applications that expect them to be named in a certain way.
--
Kind regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
eally trivial to just expose this information, so implement this.
> > >>
> > >> Signed-off-by: Hans Verkuil
> > >> Acked-by: Sakari Ailus
> > >> ---
> > >>
> > >> drivers/media/media-device.c | 1 +
> > >>
power-domains = <&pgc_mipi_phy>;
> +phy-supply = <®_1p0d>;
> +resets = <&src IMX7_RESET_MIPI_PHY_MRST>;
> +reset-names = "mrst";
> +fsl,csis-hs-settle = <3>;
> +
> +port@0 {
> +reg = <0>;
> +
> +mipi_from_sensor: endpoint {
> +remote-endpoint = <&ov2680_to_mipi>;
> +data-lanes = <1>;
> +};
> +};
> +
> +port@1 {
> +reg = <1>;
> +
> +mipi_vc0_to_csi_mux: endpoint {
> +remote-endpoint = <&csi_mux_from_mipi_vc0>;
> +};
> +};
> +};
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
rnal_ops = {
> .open = imx258_open,
> };
> @@ -1250,6 +1237,7 @@ static int imx258_probe(struct i2c_client *client)
>
> /* Initialize subdev */
> imx258->sd.internal_ops = &imx258_internal_ops;
> + imx258->sd.entity.ops = &imx258_subdev_entity_ops;
> imx258->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> imx258->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
>
--
Regards,
Sakari Ailus
sakari.ai...@linux.intel.com
Hi Rob,
Thanks for the review.
On Tue, Jul 31, 2018 at 03:32:10PM -0600, Rob Herring wrote:
> On Mon, Jul 23, 2018 at 04:46:50PM +0300, Sakari Ailus wrote:
> > Allow specifying the bus type explicitly for MIPI D-PHY, parallel and
> > Bt.656 busses. This is useful for devices that
only.
Address this for drivers where this pattern exists.
This patch has been produced using the following command:
$ git grep -l pm_runtime_get_if_in_use -- drivers/media/i2c/ | \
xargs perl -i -pe 's/(pm_runtime_get_if_in_use\(.*\)) \<\= 0/!$1/'
Signed-off-by: Sakari Ailus
hat
make use of the function. I can submit a fix for those as well.
I suppose most people use these with runtime PM enabled as this hasn't been
spotted previously.
--
Sakari Ailus
sakari.ai...@linux.intel.com
Signed-off-by: Ping-Chung Chen
Could you add obtaining the valid link frequencies from the firmware, i.e.
use v4l2_fwnode_endpoint_alloc_parse()?
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
On Mon, Jul 30, 2018 at 09:51:25AM +0200, jacopo mondi wrote:
> Hi Sakari,
>
> On Mon, Jul 30, 2018 at 10:26:27AM +0300, Sakari Ailus wrote:
> > While this isn't a bug, initialise the variable to quash the warning.
> >
> > Reported-by: Stephen Rothwell
While this isn't a bug, initialise the variable to quash the warning.
Reported-by: Stephen Rothwell
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/mt9v111.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
va (2):
media: ov2680: dt: Add bindings for OV2680
media: ov2680: Add Omnivision OV2680 sensor driver
Sakari Ailus (1):
dw9807-vcm: Recognise this is just the VCM bit of the device
.../bindings/media/i2c/aptina,mt9v111.txt | 46 +
.../devicetree/bindings/media/i2c/ov268
Rui,
Could you provide a MAINTAINERS entry patch for the driver as well as the
DT bindings? I'll squash that to the first one.
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
ource relied on media.h
> to include it.
>
> Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
gnise this is just the VCM bit of the device (2018-07-25
15:45:08 +0300)
Rui Miguel Silva (2):
media: ov2680: dt: Add bindings for OV2680
media: ov2680: Add Omnivision OV2680 sensor driver
Sakari Ailus (1):
Hi Todor,
On Wed, Jul 25, 2018 at 01:01:31PM +0300, Todor Tomov wrote:
> Hi Sakari,
>
> Thank you for review.
>
> On 24.07.2018 15:49, Sakari Ailus wrote:
> > Hi Todor,
> >
> > On Mon, Jul 23, 2018 at 02:02:35PM +0300, Todor Tomov wrote:
> >> There i
Hi Yong,
On Wed, Jul 25, 2018 at 06:42:24PM +0800, Yong wrote:
> Hi Sakari,
>
> On Wed, 18 Jul 2018 12:55:14 +0300
> Sakari Ailus wrote:
>
> > Hi Yong,
> >
> > On Thu, Jul 05, 201
On Tue, Jul 24, 2018 at 11:05:47PM -0700, Matt Ranostay wrote:
> On Mon, Jul 23, 2018 at 4:35 AM, Sakari Ailus wrote:
> > Hi Matt,
> >
> > On Sun, Jul 15, 2018 at 11:05:42PM -0700, Matt Ranostay wrote:
> >> Hello et all,
> >>
> >> So curre
l
>
> Patches 01-14 are
> Tested-by: Philipp Zabel
> on i.MX6 with Toshiba TC358743 connected via MIPI CSI-2.
>
> History:
>
> v6:
> - Export v4l2_async_notifier_init(), which must be called by all
> drivers before the first call to v4l2_async_notifier_add
Make use of the default CSI-2 lane mapping from caller-passed
configuration.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media
and Bt.656 interfaces but the means to pass that
information to software wasn't there.
Autodetection (value 0) is removed as an option as the property could be
simply omitted in that case.
Signed-off-by: Sakari Ailus
---
Documentation/devicetree/bindings/media/video-interfaces.txt | 4 +++-
1
types.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 43 +++
include/media/v4l2-mediabus.h | 2 ++
2 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core
Print debug info as standard V4L2 endpoint are parsed.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 108 ++
1 file changed, 85 insertions(+), 23 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2
The caller may provide default flags for the endpoint. Change the
configuration based on what is available through the fwnode property API.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers
Use fwnode_graph_for_each_endpoint iterator for better readability.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media
would be beneficial: the code
flows are rather convoluted and different hardware tends to excercise
different flows while the use of the use of defaults has a similar
effect.
Comments are welcome.
I've pushed the patches (including Steve's) here:
https://git.linuxtv.org/sailus/media_t
Instead of opportunistically trying to gather some information from the
V4L2 endpoint, set the bus type and let the V4L2 fwnode framework figure
out the configuration.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/smiapp/smiapp-core.c | 6 ++
1 file changed, 6 insertions(+)
diff --git
Add definitions corresponding to DT bindings to the CSI-2 D-PHY, parallel
and Bt.656 busses.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2
ation that this
is CSI-2 as it's set in the absence of the property.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2-fwnode.c
ind
with what's in DT.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 26 ++
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2-fwnode.c
index 8914abd20ee8..56e3b63
Read the lane inversion independently of whether the "data-lanes" property
exists. This makes sense since the caller may pass the number of lanes as
the default configuration while the lane inversion configuration may still
be available in firmware.
Signed-off-by: Sakari Ailus
---
dri
Only assign endpoint configuration if the endpoint is parsed successfully.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers
Instead of allocating the V4L2 fwnode endpoint in
v4l2_fwnode_endpoint_alloc_parse, let the caller to do this. This allows
setting default parameters for the endpoint which is a very common need
for drivers.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/ov2659.c | 14
Use the media bus types instead of the fwnode bus types internally. This
is the interface to the drivers as well, making the use of the fwnode bus
types more localised to the V4L2 fwnode framework.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 98
Print bus type either as set by the driver or as parsed from the bus-type
property, as well as the guessed V4L2 media bus type.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 38 +++
1 file changed, 38 insertions(+)
diff --git a/drivers
Make use of bus type specified for an endpoint.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 48 ++-
1 file changed, 36 insertions(+), 12 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2
Most hardware doesn't support re-mapping of the CSI-2 lanes. Especially
sensor drivers have a default number of lanes. Instead of requiring the
caller (the driver) to provide such a unit mapping, provide one if no
mapping is configured.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2
The semantics of v4l2_fwnode_endpoint_parse() and
v4l2_fwnode_endpoint_alloc_parse() have changed slightly: they now take
the bus type from the user as well as a default configuration for the bus
that shall reflect the DT binding defaults. Document this.
Signed-off-by: Sakari Ailus
---
drivers
The V4L2 fwnode framework only parsed CSI-2 D-PHY endpoints while C-PHY
support wasn't there. Also parse endpoints for media bus type
V4L2_MBUS_CSI2_CPHY.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
The CSI-2 bus may use either D-PHY or C-PHY. Make this visible in media
bus enum.
Signed-off-by: Sakari Ailus
---
drivers/gpu/ipu-v3/ipu-csi.c | 2 +-
drivers/media/i2c/adv7180.c | 2 +-
drivers/media/i2c/ov5640.c | 4 ++--
drivers
Parsing the graph endpoint is always successful; therefore parse it as
last.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 26 +-
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers
of just exposing the EEPROM to the user space
as-is using the NVMEM API. This information is very, very device specific
and therefore using a generic interface to access individual values there
isn't really useful.
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
The dw9807 contains a voice coil lens driver as well as an EEPROM. This
driver is just for the VCM. Reflect this in the driver's name --- this is
already the case for the compatible string, for instance.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/Kconfig
Add the DT binding documentation for dw9714 and dw9807-vcm to the
MAINTAINERS file. The dw9807-vcm binding documentation file is renamed to
match the dw9807's VCM bit's compatible string.
Signed-off-by: Sakari Ailus
---
.../bindings/media/i2c/{dongwoon,dw9807.txt => dongwoon,dw9807
801 - 900 of 6671 matches
Mail list logo