diff for duplicates of <20181125114609.6273934f@archlinux> diff --git a/a/1.txt b/N1/1.txt index ea7ef09..548ff72 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,12 +2,10 @@ On Tue, 20 Nov 2018 22:22:30 +0530 Shreeya Patel <shreeya.patel23498@gmail.com> wrote: > When the kernel starts up, it kicks off compiled-in drivers -> that match =E2=80=9Ccompatible=E2=80=9D entries it finds in the device tr= -ee. +> that match “compatible” entries it finds in the device tree. > At a later stage (when /lib/modules is available), all kernel modules -> that match =E2=80=9Ccompatible=E2=80=9D entries in the device tree are lo= -aded. ->=20 +> that match “compatible” entries in the device tree are loaded. +> > But if there is no dt table then there should be a fall back path > with which desired kernel modules can be loaded. Hence, add > of_device_id table in the i2c driver to be able to use when there @@ -29,43 +27,41 @@ Thanks, Jonathan ->=20 +> > Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> > --- ->=20 +> > Changes in v2: > - Make the commit message appropriate and assign of_match_table > in the driver structure. ->=20 +> > drivers/staging/iio/addac/adt7316-i2c.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) ->=20 -> diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/ii= -o/addac/adt7316-i2c.c +> +> diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c > index 473e5e34ec00..41bc4ca008bc 100644 > --- a/drivers/staging/iio/addac/adt7316-i2c.c > +++ b/drivers/staging/iio/addac/adt7316-i2c.c -> @@ -126,9 +126,22 @@ static const struct i2c_device_id adt7316_i2c_id[] = -=3D { -> =20 +> @@ -126,9 +126,22 @@ static const struct i2c_device_id adt7316_i2c_id[] = { +> > MODULE_DEVICE_TABLE(i2c, adt7316_i2c_id); -> =20 -> +static const struct of_device_id adt7316_of_match[] =3D { -> + { .compatible =3D "adi,adt7316" }, -> + { .compatible =3D "adi,adt7317" }, -> + { .compatible =3D "adi,adt7318" }, -> + { .compatible =3D "adi,adt7516" }, -> + { .compatible =3D "adi,adt7517" }, -> + { .compatible =3D "adi,adt7519" }, +> +> +static const struct of_device_id adt7316_of_match[] = { +> + { .compatible = "adi,adt7316" }, +> + { .compatible = "adi,adt7317" }, +> + { .compatible = "adi,adt7318" }, +> + { .compatible = "adi,adt7516" }, +> + { .compatible = "adi,adt7517" }, +> + { .compatible = "adi,adt7519" }, > + { }, > +}; > + > +MODULE_DEVICE_TABLE(of, adt7316_of_match); > + -> static struct i2c_driver adt7316_driver =3D { -> .driver =3D { -> .name =3D "adt7316", -> + .of_match_table =3D adt7316_of_match, -> .pm =3D ADT7316_PM_OPS, +> static struct i2c_driver adt7316_driver = { +> .driver = { +> .name = "adt7316", +> + .of_match_table = adt7316_of_match, +> .pm = ADT7316_PM_OPS, > }, -> .probe =3D adt7316_i2c_probe, +> .probe = adt7316_i2c_probe, diff --git a/a/content_digest b/N1/content_digest index 1a02735..ca7ea5e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -17,12 +17,10 @@ "Shreeya Patel <shreeya.patel23498@gmail.com> wrote:\n" "\n" "> When the kernel starts up, it kicks off compiled-in drivers\n" - "> that match =E2=80=9Ccompatible=E2=80=9D entries it finds in the device tr=\n" - "ee.\n" + "> that match \342\200\234compatible\342\200\235 entries it finds in the device tree.\n" "> At a later stage (when /lib/modules is available), all kernel modules\n" - "> that match =E2=80=9Ccompatible=E2=80=9D entries in the device tree are lo=\n" - "aded.\n" - ">=20\n" + "> that match \342\200\234compatible\342\200\235 entries in the device tree are loaded.\n" + "> \n" "> But if there is no dt table then there should be a fall back path\n" "> with which desired kernel modules can be loaded. Hence, add\n" "> of_device_id table in the i2c driver to be able to use when there\n" @@ -44,45 +42,43 @@ "Jonathan\n" "\n" "\n" - ">=20\n" + "> \n" "> Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>\n" "> ---\n" - ">=20\n" + "> \n" "> Changes in v2:\n" "> - Make the commit message appropriate and assign of_match_table\n" "> in the driver structure.\n" - ">=20\n" + "> \n" "> drivers/staging/iio/addac/adt7316-i2c.c | 13 +++++++++++++\n" "> 1 file changed, 13 insertions(+)\n" - ">=20\n" - "> diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/ii=\n" - "o/addac/adt7316-i2c.c\n" + "> \n" + "> diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c\n" "> index 473e5e34ec00..41bc4ca008bc 100644\n" "> --- a/drivers/staging/iio/addac/adt7316-i2c.c\n" "> +++ b/drivers/staging/iio/addac/adt7316-i2c.c\n" - "> @@ -126,9 +126,22 @@ static const struct i2c_device_id adt7316_i2c_id[] =\n" - "=3D {\n" - "> =20\n" + "> @@ -126,9 +126,22 @@ static const struct i2c_device_id adt7316_i2c_id[] = {\n" + "> \n" "> MODULE_DEVICE_TABLE(i2c, adt7316_i2c_id);\n" - "> =20\n" - "> +static const struct of_device_id adt7316_of_match[] =3D {\n" - "> +\t{ .compatible =3D \"adi,adt7316\" },\n" - "> +\t{ .compatible =3D \"adi,adt7317\" },\n" - "> +\t{ .compatible =3D \"adi,adt7318\" },\n" - "> +\t{ .compatible =3D \"adi,adt7516\" },\n" - "> +\t{ .compatible =3D \"adi,adt7517\" },\n" - "> +\t{ .compatible =3D \"adi,adt7519\" },\n" + "> \n" + "> +static const struct of_device_id adt7316_of_match[] = {\n" + "> +\t{ .compatible = \"adi,adt7316\" },\n" + "> +\t{ .compatible = \"adi,adt7317\" },\n" + "> +\t{ .compatible = \"adi,adt7318\" },\n" + "> +\t{ .compatible = \"adi,adt7516\" },\n" + "> +\t{ .compatible = \"adi,adt7517\" },\n" + "> +\t{ .compatible = \"adi,adt7519\" },\n" "> +\t{ },\n" "> +};\n" "> +\n" "> +MODULE_DEVICE_TABLE(of, adt7316_of_match);\n" "> +\n" - "> static struct i2c_driver adt7316_driver =3D {\n" - "> \t.driver =3D {\n" - "> \t\t.name =3D \"adt7316\",\n" - "> +\t\t.of_match_table =3D adt7316_of_match,\n" - "> \t\t.pm =3D ADT7316_PM_OPS,\n" + "> static struct i2c_driver adt7316_driver = {\n" + "> \t.driver = {\n" + "> \t\t.name = \"adt7316\",\n" + "> +\t\t.of_match_table = adt7316_of_match,\n" + "> \t\t.pm = ADT7316_PM_OPS,\n" "> \t},\n" - "> \t.probe =3D adt7316_i2c_probe," + "> \t.probe = adt7316_i2c_probe," -1e2dcbba76efcbcc8667caec296a6a446a9e171776c2fdd33448d068d0c61410 +76efcfe8999ee7246a3a8c62b365db4bc21751add5f71129e6c81b7622047d24
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.