Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1f8c907 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10538): saa6588: add g_chip_ident support.

parent c3fda7f8
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@


#include <media/rds.h>
#include <media/rds.h>
#include <media/v4l2-device.h>
#include <media/v4l2-device.h>
#include <media/v4l2-chip-ident.h>
#include <media/v4l2-i2c-drv-legacy.h>
#include <media/v4l2-i2c-drv-legacy.h>


/* Addresses to scan */
/* Addresses to scan */
@@ -431,6 +432,13 @@ static long saa6588_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
	return 0;
	return 0;
}
}


static int saa6588_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip)
{
	struct i2c_client *client = v4l2_get_subdevdata(sd);

	return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_SAA6588, 0);
}

static int saa6588_command(struct i2c_client *client, unsigned cmd, void *arg)
static int saa6588_command(struct i2c_client *client, unsigned cmd, void *arg)
{
{
	return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
	return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg);
@@ -439,6 +447,7 @@ static int saa6588_command(struct i2c_client *client, unsigned cmd, void *arg)
/* ----------------------------------------------------------------------- */
/* ----------------------------------------------------------------------- */


static const struct v4l2_subdev_core_ops saa6588_core_ops = {
static const struct v4l2_subdev_core_ops saa6588_core_ops = {
	.g_chip_ident = saa6588_g_chip_ident,
	.ioctl = saa6588_ioctl,
	.ioctl = saa6588_ioctl,
};
};


+3 −0
Original line number Original line Diff line number Diff line
@@ -92,6 +92,9 @@ enum {
	/* module tea6420: just ident 6420 */
	/* module tea6420: just ident 6420 */
	V4L2_IDENT_TEA6420 = 6420,
	V4L2_IDENT_TEA6420 = 6420,


	/* module saa6588: just ident 6588 */
	V4L2_IDENT_SAA6588 = 6588,

	/* module saa6752hs: reserved range 6750-6759 */
	/* module saa6752hs: reserved range 6750-6759 */
	V4L2_IDENT_SAA6752HS = 6752,
	V4L2_IDENT_SAA6752HS = 6752,
	V4L2_IDENT_SAA6752HS_AC3 = 6753,
	V4L2_IDENT_SAA6752HS_AC3 = 6753,