create mode 100644 scripts/coccinelle/misc/add_namespace.cocci
> create mode 100644 scripts/nsdeps
[]
> +if [ "$SPATCH_VERSION_NUM" -lt "$SPATCH_REQ_VERSION_NUM" ] ; then
> + echo 'spatch needs to be version 1.06 or higher'
Nitpick: 1.0.6
> +exit 1
> +
.
Currently pressure is reported in hectopascal(hPa) and relative humidity
in percent. Hence fix this ABI mismatch conforming to the standard ABI.
Fixes: 1b3bd8592780 ("iio: chemical: Add support for Bosch BME680 sensor")
Signed-off-by: Himanshu Jha
---
While cleaning this mess I wo
Use recently introduced devm_platform_ioremap_resource
helper which wraps platform_get_resource() and
devm_ioremap_resource() together. This helps produce much
cleaner code and remove local `struct resource` declaration.
Signed-off-by: Himanshu Jha
Signed-off-by: Julia Lawall
---
v2
be removed in this same patch:
* Licensed under the GPL-2 or later.
And lastly, MODULE_LICENSE() should also be checked, which appear
to be correct in its current form.
> /*
> * ADIS16203 Programmable 360 Degrees Inclinometer
> *
> --
> 2.1.4
>
--
Himanshu Jh
On Sat, Mar 16, 2019 at 01:00:39PM +, Mike Looijmans wrote:
> On 16-03-19 11:24, Himanshu Jha wrote:
> > On Wed, Mar 06, 2019 at 08:31:48AM +0100, Mike Looijmans wrote:
> >> The SPI interface implementation was completely broken.
> >>
> >> When using the SPI
name in_temp_input \
in_pressure_input in_humidityrelative_input in_resistance_input
bme680
26860 --> w/o your patch it used to be 26.86000 degC
990.87000
55.26500
10091
I'm still assuming that there is some problem on my side, as it works
flawless for you. But it is really difficult for me to figure out
exactly where the problem could be!
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
uct bme680_spi_bus_context *ctx = context;
> + struct spi_device *spi = ctx->spi;
> + int ret;
> + u8 addr = *(const u8 *)reg;
> + u8 addr7;
Unused variable.
> + ret = bme680_regmap_spi_select_page(ctx, addr);
> + if (ret)
> + return ret;
&
list);
> > + } else {
> > + return NULL;
>
> I'd argue that this is a bit redundant, because `dev` is NULL, the
> return below (return dev) will also return NULL.
+1
Also, subject title is incorrect.
Always use:
$ git log --oneline drivers/iio/industrialio-core
On Mon, Jan 14, 2019 at 03:19:13PM -0500, Sebastien Bourdelin wrote:
> This commit allow the driver to work with device-tree.
>
> Signed-off-by: Sebastien Bourdelin
> ---
Acked-by: Himanshu Jha
Thanks!
> v2 -> v3:
> - remove of_match_ptr: Suggested by Jonathan
On Mon, Jan 14, 2019 at 03:19:14PM -0500, Sebastien Bourdelin wrote:
> BME680 is a pressure/temperature/humidity/voc sensor.
>
> Signed-off-by: Sebastien Bourdelin
> ---
> v2 -> v3:
> - change i2c address to 0x76 as it seems more reliable: Suggested by
> Himanshu Jha
Hi Sebastien,
On Mon, Jan 14, 2019 at 03:00:41PM -0500, sebastien bourdelin wrote:
> Hi,
>
> On 1/12/19 4:42 AM, Himanshu Jha wrote:
> > On Fri, Jan 11, 2019 at 03:53:58PM -0500, Sebastien Bourdelin wrote:
> > > This commit allow the driver to work with device-tree.
what "VDIDO" is, as explained in the
datasheet.
Anyway, if the above compilation issue is not a problem, then
Acked-by: Himanshu Jha
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
On Wed, Jan 02, 2019 at 01:25:27PM -0800, Matt Ranostay wrote:
>
> > On Dec 24, 2018, at 01:58, Himanshu Jha wrote:
> >
> >> On Fri, Dec 21, 2018 at 03:26:26PM -0800, Amir Mahdi Ghorbanian wrote:
> >> Replaced bool in struct with unsigned int bitfield to con
unsigned intchop_en : 1;
> + unsigned intbuf_en : 1;
> + unsigned intunipolar_en : 1;
> + unsigned intburnout_curr_en : 1;
> };
>
> #endif /* IIO_ADC_AD7192_H_ */
> --
> 2.7.4
>
Goodluck!
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
e - I find this tag kinda useless and duplicative. But whatever.
I'm fine either way, just the problem is:
Co-developed-by Vs Co-Developed-by
with checkpatch spitting out that it is not a valid signature.
In the end, I can completely remove the tag from docs if it is useless
and duplicative.
--
H
On Fri, Dec 14, 2018 at 09:39:10AM -0800, Joe Perches wrote:
> On Fri, 2018-12-14 at 22:58 +0530, Himanshu Jha wrote:
> > On Fri, Dec 14, 2018 at 08:27:33AM -0800, Joe Perches wrote:
> > > Is it really important to specify things like 75% / 25%
> > > authorship
nother
> developer
> along with the original author. This is useful at times when multiple people
> work on a single patch. Note, this person also needs to have a
> Signed-off-by:
> line in the patch as well.
> --
> 2.7.4
>
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
On Fri, Dec 14, 2018 at 08:27:33AM -0800, Joe Perches wrote:
> On Fri, 2018-12-14 at 21:46 +0530, Himanshu Jha wrote:
> > On Fri, Dec 14, 2018 at 07:52:15AM -0800, Joe Perches wrote:
> > > On Fri, 2018-12-14 at 14:01 +0100, Jorge Ramirez-Ortiz wrote:
> > > > As per Do
multiple Signed-off-by: in the commits imply that
the patch was created by all those developers ?
I don't think so, perhaps this was the reason to introduce
Co-developed-by: tag.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
> Signed-off-by: Marcelo Schmitt
> Signed-off-by: Gabriel Capella
> ---
Use `./scripts/get_maintainer.pl ` to list the DT
maintainers and the relevant mailing list.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
> Signed-off-by: Marcelo Schmitt
> Signed-off-by: Gabriel Capella
> ---
Use `./scripts/get_maintainer.pl ` to list the DT
maintainers and the relevant mailing list.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
serial number\n");
> + return ret;
> + }
> + dev_info(>dev, "serial number: %s\n", buf);
> +
> + ret = sps30_do_cmd(state, SPS30_START_MEAS, NULL, 0);
> + if (ret) {
> + dev_err(>dev, "failed to start measurement
serial number\n");
> + return ret;
> + }
> + dev_info(>dev, "serial number: %s\n", buf);
> +
> + ret = sps30_do_cmd(state, SPS30_START_MEAS, NULL, 0);
> + if (ret) {
> + dev_err(>dev, "failed to start measurement
tree/bindings/iio/resolver/ad2s1210.txt
Cc'ed to devictree list + Rob(DT Maintainer).
Just wondering why didn't it came up till now from the IIO reviewers ? v7!!
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
tree/bindings/iio/resolver/ad2s1210.txt
Cc'ed to devictree list + Rob(DT Maintainer).
Just wondering why didn't it came up till now from the IIO reviewers ? v7!!
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
Regardless, integer conversion rules will kick in.
> But the :1 adds instructions, so at least for only one bool, where little
> space is saved, it is probably not worth it.
True, we should reply on a promised guideline rather than possibility.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
Regardless, integer conversion rules will kick in.
> But the :1 adds instructions, so at least for only one bool, where little
> space is saved, it is probably not worth it.
True, we should reply on a promised guideline rather than possibility.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
report is difficult to figure
out by just doing a glance analysis. :)
Linus also suggested to use bool as the base type i.e., `bool x:1` but
again sizeof(_Bool) is implementation defined ranging from 1-4 bytes.
And since this issue is added to checkpatch now, very likely there would
be blast of patches
report is difficult to figure
out by just doing a glance analysis. :)
Linus also suggested to use bool as the base type i.e., `bool x:1` but
again sizeof(_Bool) is implementation defined ranging from 1-4 bytes.
And since this issue is added to checkpatch now, very likely there would
be blast of patches
I used BME0680 for bosch bme680 sensor!
In OF matching, we use vendor prefixes and that looks more legimate:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/vendor-prefixes.txt
Dan,
These questions are not just for you but to rest of the community
members as well.
If there is something I misunderstood, then please let me know :)
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
I used BME0680 for bosch bme680 sensor!
In OF matching, we use vendor prefixes and that looks more legimate:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/vendor-prefixes.txt
Dan,
These questions are not just for you but to rest of the community
members as well.
If there is something I misunderstood, then please let me know :)
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
I missing something?
Your patch applies fine.
I think the problem is on Lars end due to Thunderbird.
In the meantime, you can verify the patch using:
$ git am
Also, you can try to use `git send-email` to send patches.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
I missing something?
Your patch applies fine.
I think the problem is on Lars end due to Thunderbird.
In the meantime, you can verify the patch using:
$ git am
Also, you can try to use `git send-email` to send patches.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
aligned.
Please send the new version of a patch as a *new* thread and don't
use `--in-reply-to` flag(if you're using) to chain into older versions
as whole thread of older discussion comes up and is often not required.
The changelog gives enough info of what's new in the revised series.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
aligned.
Please send the new version of a patch as a *new* thread and don't
use `--in-reply-to` flag(if you're using) to chain into older versions
as whole thread of older discussion comes up and is often not required.
The changelog gives enough info of what's new in the revised series.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
as a safety measure you may use the `--dry-run` flag
of `git send-email` to see how it would look like when you
send the patch.
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
as a safety measure you may use the `--dry-run` flag
of `git send-email` to see how it would look like when you
send the patch.
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
LE_DEVICE_TABLE(of, rm3100_dt_match);
> +
> +static struct spi_driver rm3100_driver = {
> + .driver = {
> + .name = "rm3100-spi",
> + .of_match_table = rm3100_dt_match,
> + },
> + .probe = rm3100_probe,
> +};
> +module_spi_driver(rm3100_driver);
> +
> +MODULE_AUTHOR("Song Qiang ");
> +MODULE_DESCRIPTION("PNI RM3100 3-axis magnetometer spi driver");
> +MODULE_LICENSE("GPL v2");
> diff --git a/drivers/iio/magnetometer/rm3100.h
> b/drivers/iio/magnetometer/rm3100.h
> new file mode 100644
> index ..673647574add
> --- /dev/null
> +++ b/drivers/iio/magnetometer/rm3100.h
> @@ -0,0 +1,73 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Header file for PNI RM3100 driver
Remove this bogus line.
> + * Copyright (C) 2018 Song Qiang
> + */
> +
> +#ifndef RM3100_CORE_H
> +#define RM3100_CORE_H
> +
> +#include
> +
> +#define RM3100_REG_REV_ID0x36
Does this ID needs to be checked and validated during
intialisation with default state ID val ?
> +
> +/* Cycle Count Registers. */
> +#define RM3100_REG_CC_X 0x05
> +#define RM3100_REG_CC_Y 0x07
> +#define RM3100_REG_CC_Z 0x09
> +
> +/* Continues Measurement Mode register. */
Is it continuous ?
> +#define RM3100_REG_CMM 0x01
> +#define RM3100_CMM_START BIT(0)
> +#define RM3100_CMM_X BIT(4)
> +#define RM3100_CMM_Y BIT(5)
> +#define RM3100_CMM_Z BIT(6)
> +
> +/* TiMe Rate Configuration register. */
Time!
> +#define RM3100_REG_TMRC 0x0B
> +#define RM3100_TMRC_OFFSET 0x92
> +
> +/* Result Status register. */
> +#define RM3100_REG_STATUS0x34
> +#define RM3100_STATUS_DRDY BIT(7)
If this status bit is a field of status register then
align this as:
#define RM3100_REG_STATUS 0x34
#define RM3100_STATUS_DRDY BIT(7)
> +/* Measurement result registers. */
> +#define RM3100_REG_MX2 0x24
> +#define RM3100_REG_MY2 0x27
> +#define RM3100_REG_MZ2 0x2a
> +
> +#define RM3100_W_REG_START RM3100_REG_CMM
> +#define RM3100_W_REG_END RM3100_REG_REV_ID
> +#define RM3100_R_REG_START RM3100_REG_CMM
> +#define RM3100_R_REG_END RM3100_REG_STATUS
> +#define RM3100_V_REG_START RM3100_REG_MX2
> +#define RM3100_V_REG_END RM3100_REG_STATUS
> +
> +#define RM3100_SCAN_BYTES24
> +
> +struct rm3100_data {
> + struct device *dev;
Better remove this ?
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
LE_DEVICE_TABLE(of, rm3100_dt_match);
> +
> +static struct spi_driver rm3100_driver = {
> + .driver = {
> + .name = "rm3100-spi",
> + .of_match_table = rm3100_dt_match,
> + },
> + .probe = rm3100_probe,
> +};
> +module_spi_driver(rm3100_driver);
> +
> +MODULE_AUTHOR("Song Qiang ");
> +MODULE_DESCRIPTION("PNI RM3100 3-axis magnetometer spi driver");
> +MODULE_LICENSE("GPL v2");
> diff --git a/drivers/iio/magnetometer/rm3100.h
> b/drivers/iio/magnetometer/rm3100.h
> new file mode 100644
> index ..673647574add
> --- /dev/null
> +++ b/drivers/iio/magnetometer/rm3100.h
> @@ -0,0 +1,73 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Header file for PNI RM3100 driver
Remove this bogus line.
> + * Copyright (C) 2018 Song Qiang
> + */
> +
> +#ifndef RM3100_CORE_H
> +#define RM3100_CORE_H
> +
> +#include
> +
> +#define RM3100_REG_REV_ID0x36
Does this ID needs to be checked and validated during
intialisation with default state ID val ?
> +
> +/* Cycle Count Registers. */
> +#define RM3100_REG_CC_X 0x05
> +#define RM3100_REG_CC_Y 0x07
> +#define RM3100_REG_CC_Z 0x09
> +
> +/* Continues Measurement Mode register. */
Is it continuous ?
> +#define RM3100_REG_CMM 0x01
> +#define RM3100_CMM_START BIT(0)
> +#define RM3100_CMM_X BIT(4)
> +#define RM3100_CMM_Y BIT(5)
> +#define RM3100_CMM_Z BIT(6)
> +
> +/* TiMe Rate Configuration register. */
Time!
> +#define RM3100_REG_TMRC 0x0B
> +#define RM3100_TMRC_OFFSET 0x92
> +
> +/* Result Status register. */
> +#define RM3100_REG_STATUS0x34
> +#define RM3100_STATUS_DRDY BIT(7)
If this status bit is a field of status register then
align this as:
#define RM3100_REG_STATUS 0x34
#define RM3100_STATUS_DRDY BIT(7)
> +/* Measurement result registers. */
> +#define RM3100_REG_MX2 0x24
> +#define RM3100_REG_MY2 0x27
> +#define RM3100_REG_MZ2 0x2a
> +
> +#define RM3100_W_REG_START RM3100_REG_CMM
> +#define RM3100_W_REG_END RM3100_REG_REV_ID
> +#define RM3100_R_REG_START RM3100_REG_CMM
> +#define RM3100_R_REG_END RM3100_REG_STATUS
> +#define RM3100_V_REG_START RM3100_REG_MX2
> +#define RM3100_V_REG_END RM3100_REG_STATUS
> +
> +#define RM3100_SCAN_BYTES24
> +
> +struct rm3100_data {
> + struct device *dev;
Better remove this ?
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
ertainly it is undefined behavior and called "overflow".
And here `temp` is guaranteed to not overflow!
But I don't understand what issue are you trying to resolve here and I'm
interested in this particular set of warnings because I too get coverity
scan reports on the same although I onl
ertainly it is undefined behavior and called "overflow".
And here `temp` is guaranteed to not overflow!
But I don't understand what issue are you trying to resolve here and I'm
interested in this particular set of warnings because I too get coverity
scan reports on the same although I onl
NU General Public License (GPL) version 2 only' use:
217 SPDX-License-Identifier: GPL-2.0
218 For 'GNU General Public License (GPL) version 2 or any later
version' use:
219 SPDX-License-Identifier: GPL-2.0+
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
NU General Public License (GPL) version 2 only' use:
217 SPDX-License-Identifier: GPL-2.0
218 For 'GNU General Public License (GPL) version 2 or any later
version' use:
219 SPDX-License-Identifier: GPL-2.0+
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
stro-3559/
And it nests properly in the given thread avoiding any noise to kbuild
bot.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
stro-3559/
And it nests properly in the given thread avoiding any noise to kbuild
bot.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
gnetometer/hmc5843_i2c.ko]
> >> undefined!
You would need to export these above symbols using EXPORT_SYMBOL()
to be used by i2c/spi modules.
But on the other hand, exporting too many symbols is a bad idea since
it is only used for this driver and not at any other place in IIO.
So,
gnetometer/hmc5843_i2c.ko]
> >> undefined!
You would need to export these above symbols using EXPORT_SYMBOL()
to be used by i2c/spi modules.
But on the other hand, exporting too many symbols is a bad idea since
it is only used for this driver and not at any other place in IIO.
So,
er
//# of_device_get_match_data() returns const * and therefore the left
//# argument of assignment should also be a const * for compatible
//# types.
///
// Confidence: Moderate
// Copyright: (C) 2018 Himanshu Jha, GPLv2.
// Copyright: (C) 2018 Julia Lawall, INRIA/LIP6. GPLv
er
//# of_device_get_match_data() returns const * and therefore the left
//# argument of assignment should also be a const * for compatible
//# types.
///
// Confidence: Moderate
// Copyright: (C) 2018 Himanshu Jha, GPLv2.
// Copyright: (C) 2018 Julia Lawall, INRIA/LIP6. GPLv
nce you're done with your major
at University. You would need to test/review patches in future.
Not a big deal though..
> +
> +static const struct of_device_id st_vl53l0x_dt_match[] = {
> + { .compatible = "st,vl53l0x-i2c", },
> + { }
> +};
MODULE_DEVICE_TABLE(
nce you're done with your major
at University. You would need to test/review patches in future.
Not a big deal though..
> +
> +static const struct of_device_id st_vl53l0x_dt_match[] = {
> + { .compatible = "st,vl53l0x-i2c", },
> + { }
> +};
MODULE_DEVICE_TABLE(
s ?
I see its wide usage in IIO without bug reports:
himanshu@himanshu-Vostro-3559:~/linux-next$ git grep -w "IIO_DEGREE_TO_RAD"
drivers/iio/ | wc -l
34
And that concludes, that there is some problem within your code!
In the meantime, you can try to look the disassembly of the funct
s ?
I see its wide usage in IIO without bug reports:
himanshu@himanshu-Vostro-3559:~/linux-next$ git grep -w "IIO_DEGREE_TO_RAD"
drivers/iio/ | wc -l
34
And that concludes, that there is some problem within your code!
In the meantime, you can try to look the disassembly of the funct
doesn't get included in the commit
message.
And no need to reply an explicit "thanks".
That is implicit ;)
We already have a ~30k email traffic on LKML...
https://marc.info/?l=linux-kernel=1=2
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
doesn't get included in the commit
message.
And no need to reply an explicit "thanks".
That is implicit ;)
We already have a ~30k email traffic on LKML...
https://marc.info/?l=linux-kernel=1=2
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
nd would save
his effort of doing it again :)
https://lore.kernel.org/lkml/20180903183618.ga6...@embeddedor.com/
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Xilinx, Inc.");
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
nd would save
his effort of doing it again :)
https://lore.kernel.org/lkml/20180903183618.ga6...@embeddedor.com/
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Xilinx, Inc.");
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
+ return -ETIMEDOUT;
> +
> + msg[0].addr = client->addr;
> + msg[0].buf = _command;
> + msg[0].len = 1;
> + msg[0].flags = client->flags | I2C_M_STOP;
> +
> + msg[1].addr = client->addr;
> + msg[1].buf = buffer;
> + msg[1].len = 12;
>
+ return -ETIMEDOUT;
> +
> + msg[0].addr = client->addr;
> + msg[0].buf = _command;
> + msg[0].len = 1;
> + msg[0].flags = client->flags | I2C_M_STOP;
> +
> + msg[1].addr = client->addr;
> + msg[1].buf = buffer;
> + msg[1].len = 12;
>
159ULL + 900ULL) / 1800ULL)
This '/' operator might be the culprit!
Just for checking that the error, remove the macro declaration
`FXAS21002C_SCALE`
plus its usage and re-cross compile using `make ARCH=i386`.
In my case I used the `div64_s64` function handles builds for both 32/64
ar
159ULL + 900ULL) / 1800ULL)
This '/' operator might be the culprit!
Just for checking that the error, remove the macro declaration
`FXAS21002C_SCALE`
plus its usage and re-cross compile using `make ARCH=i386`.
In my case I used the `div64_s64` function handles builds for both 32/64
ar
sizeof(*data));
> + if (!indio_dev)
> + return -ENOMEM;
> +
> + data = iio_priv(indio_dev);
> + data->client = client;
> + data->indio_dev = indio_dev;
Is this required ?
> + i2c_set_clientdata(client, indio_dev);
> +
> + if (!i2c_check_functionality(client->adapter,
> + I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_I2C))
> + return -EOPNOTSUPP;
> +
> + indio_dev->dev.parent = >dev;
> + indio_dev->name = VL53L0X_DRV_NAME;
> + indio_dev->info = _info;
> + indio_dev->channels = vl53l0x_channels;
> + indio_dev->num_channels = ARRAY_SIZE(vl53l0x_channels);
> + indio_dev->modes = INDIO_DIRECT_MODE;
> +
> + ret = devm_iio_device_register(>dev, indio_dev);
return devm_iio_device_register(>dev, indio_dev);
> + if (ret)
> + return ret;
> +
> + return 0;
> +}
Do you have the sensor and are these patches tested ?
Just curious!
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
sizeof(*data));
> + if (!indio_dev)
> + return -ENOMEM;
> +
> + data = iio_priv(indio_dev);
> + data->client = client;
> + data->indio_dev = indio_dev;
Is this required ?
> + i2c_set_clientdata(client, indio_dev);
> +
> + if (!i2c_check_functionality(client->adapter,
> + I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_I2C))
> + return -EOPNOTSUPP;
> +
> + indio_dev->dev.parent = >dev;
> + indio_dev->name = VL53L0X_DRV_NAME;
> + indio_dev->info = _info;
> + indio_dev->channels = vl53l0x_channels;
> + indio_dev->num_channels = ARRAY_SIZE(vl53l0x_channels);
> + indio_dev->modes = INDIO_DIRECT_MODE;
> +
> + ret = devm_iio_device_register(>dev, indio_dev);
return devm_iio_device_register(>dev, indio_dev);
> + if (ret)
> + return ret;
> +
> + return 0;
> +}
Do you have the sensor and are these patches tested ?
Just curious!
Thanks
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
On Tue, Sep 11, 2018 at 02:46:38PM +0800, Song Qiang wrote:
> On Mon, Sep 10, 2018 at 11:27:47PM +0530, Himanshu Jha wrote:
> > On Mon, Sep 10, 2018 at 10:42:59PM +0800, Song Qiang wrote:
> > > This driver was originally written by ST in 2016 as a misc input device,
>
On Tue, Sep 11, 2018 at 02:46:38PM +0800, Song Qiang wrote:
> On Mon, Sep 10, 2018 at 11:27:47PM +0530, Himanshu Jha wrote:
> > On Mon, Sep 10, 2018 at 10:42:59PM +0800, Song Qiang wrote:
> > > This driver was originally written by ST in 2016 as a misc input device,
>
gt; + data = iio_priv(indio_dev);
> + data->client = client;
> + i2c_set_clientdata(client, indio_dev);
> + mutex_init(>lock);
> +
> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE))
> + return -EOPNOTSUPP;
> +
&g
gt; + data = iio_priv(indio_dev);
> + data->client = client;
> + i2c_set_clientdata(client, indio_dev);
> + mutex_init(>lock);
> +
> + if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE))
> + return -EOPNOTSUPP;
> +
&g
sensor_data.hum_data);
> + data->buffer[i] = sensor_data.temp_data;
No, this seems wrong!
We have buffer support to either take both readings(temp & humid)
simultaneously, or only single channel using specified scan mask.
Patch title should be:
"
sensor_data.hum_data);
> + data->buffer[i] = sensor_data.temp_data;
No, this seems wrong!
We have buffer support to either take both readings(temp & humid)
simultaneously, or only single channel using specified scan mask.
Patch title should be:
"
> + return 0;
> +}
> +
> +static int fxas21002c_read_oneshot(struct fxas21002c_data *data,
> +struct iio_chan_spec const *chan, int *val)
Similar alignment here.
> + int ret;
> + __be16 bulk_raw;
> +
> + switch (chan->type) {
> +
> + return 0;
> +}
> +
> +static int fxas21002c_read_oneshot(struct fxas21002c_data *data,
> +struct iio_chan_spec const *chan, int *val)
Similar alignment here.
> + int ret;
> + __be16 bulk_raw;
> +
> + switch (chan->type) {
> +
On Sun, Aug 19, 2018 at 05:25:14PM +0100, Jonathan Cameron wrote:
> On Sat, 11 Aug 2018 15:56:36 +0530
> Himanshu Jha wrote:
>
> > val2 is responsible for the floating part of the number to be
> > written to the device. We don't need the floating part
> > while wri
On Sun, Aug 19, 2018 at 05:25:14PM +0100, Jonathan Cameron wrote:
> On Sat, 11 Aug 2018 15:56:36 +0530
> Himanshu Jha wrote:
>
> > val2 is responsible for the floating part of the number to be
> > written to the device. We don't need the floating part
> > while wri
On Sat, Aug 18, 2018 at 10:10:26PM +0800, zhong jiang wrote:
> On 2018/8/18 22:01, Julia Lawall wrote:
> >
> > On Sat, 18 Aug 2018, zhong jiang wrote:
> >
> >> On 2018/8/18 20:52, Himanshu Jha wrote:
> >>> On Sat, Aug 18, 2018 at 08:01:40P
On Sat, Aug 18, 2018 at 10:10:26PM +0800, zhong jiang wrote:
> On 2018/8/18 22:01, Julia Lawall wrote:
> >
> > On Sat, 18 Aug 2018, zhong jiang wrote:
> >
> >> On 2018/8/18 20:52, Himanshu Jha wrote:
> >>> On Sat, Aug 18, 2018 at 08:01:40P
ot; -> "detect"
Otherwise,
Acked-by: Himanshu Jha
Thanks for cleaning up, we still have few more *_alloc/memset
in the mainline, especially in the scsi subsystem, even after
I cleaned up with two long patch series in the past.
--
Himanshu Jha
Undergraduate Student
Department of Electr
ot; -> "detect"
Otherwise,
Acked-by: Himanshu Jha
Thanks for cleaning up, we still have few more *_alloc/memset
in the mainline, especially in the scsi subsystem, even after
I cleaned up with two long patch series in the past.
--
Himanshu Jha
Undergraduate Student
Department of Electr
ernel.org/doc/html/latest/process/submitting-patches.html#the-canonical-patch-format
Hope that helps!
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
ernel.org/doc/html/latest/process/submitting-patches.html#the-canonical-patch-format
Hope that helps!
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
-by: Himanshu Jha
---
drivers/iio/chemical/bme680_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iio/chemical/bme680_core.c
b/drivers/iio/chemical/bme680_core.c
index 7d9bb62baa3f..9d5a05e054d1 100644
--- a/drivers/iio/chemical/bme680_core.c
+++ b/drivers/iio/chemical/bme680_core.c
-by: Himanshu Jha
---
drivers/iio/chemical/bme680_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iio/chemical/bme680_core.c
b/drivers/iio/chemical/bme680_core.c
index 7d9bb62baa3f..9d5a05e054d1 100644
--- a/drivers/iio/chemical/bme680_core.c
+++ b/drivers/iio/chemical/bme680_core.c
olete and likely more prone to be disfunctional.
For instance: https://systeme.lip6.fr/pipermail/cocci/2017-December/004799.html
Thanks.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
olete and likely more prone to be disfunctional.
For instance: https://systeme.lip6.fr/pipermail/cocci/2017-December/004799.html
Thanks.
--
Himanshu Jha
Undergraduate Student
Department of Electronics & Communication
Guru Tegh Bahadur Institute of Technology
On Fri, Aug 03, 2018 at 12:55:51PM +0100, Colin King wrote:
> From: Colin Ian King
>
> fix spelling mistake in dev_err error message text
>
> Signed-off-by: Colin Ian King
Oops! Thanks for the patch Colin.
Reviewed-by: Himanshu Jha
--
Himanshu Jha
Undergraduate Stu
On Fri, Aug 03, 2018 at 12:55:51PM +0100, Colin King wrote:
> From: Colin Ian King
>
> fix spelling mistake in dev_err error message text
>
> Signed-off-by: Colin Ian King
Oops! Thanks for the patch Colin.
Reviewed-by: Himanshu Jha
--
Himanshu Jha
Undergraduate Stu
/datasheets/BST-BME680-DS001-00.pdf
Cc: Daniel Baluta
Signed-off-by: Himanshu Jha
---
v5:
-removed unnecessary casts from compensate functions.
-used devm_iio_register for now.
-used bitshifting near approximation instead of complex multiplication
in bme680_compensate_gas
/datasheets/BST-BME680-DS001-00.pdf
Cc: Daniel Baluta
Signed-off-by: Himanshu Jha
---
v5:
-removed unnecessary casts from compensate functions.
-used devm_iio_register for now.
-used bitshifting near approximation instead of complex multiplication
in bme680_compensate_gas
On Mon, Jul 23, 2018 at 03:16:10PM -0700, David Frey wrote:
> On 7/22/2018 3:21 PM, Himanshu Jha wrote:
> >On Sat, Jul 21, 2018 at 08:45:34PM +0300, Daniel Baluta wrote:
> >>On Sat, Jul 21, 2018 at 6:43 PM, Andy Shevchenko
> >> wrote:
> >>>On Sat, Jul 21, 20
On Mon, Jul 23, 2018 at 03:16:10PM -0700, David Frey wrote:
> On 7/22/2018 3:21 PM, Himanshu Jha wrote:
> >On Sat, Jul 21, 2018 at 08:45:34PM +0300, Daniel Baluta wrote:
> >>On Sat, Jul 21, 2018 at 6:43 PM, Andy Shevchenko
> >> wrote:
> >>>On Sat, Jul 21, 20
On Sat, Jul 21, 2018 at 08:45:34PM +0300, Daniel Baluta wrote:
> On Sat, Jul 21, 2018 at 6:43 PM, Andy Shevchenko
> wrote:
> > On Sat, Jul 21, 2018 at 6:36 PM, Himanshu Jha
> > wrote:
> >
> >>> > + /* Look up table 1 for the possible gas range va
On Sat, Jul 21, 2018 at 08:45:34PM +0300, Daniel Baluta wrote:
> On Sat, Jul 21, 2018 at 6:43 PM, Andy Shevchenko
> wrote:
> > On Sat, Jul 21, 2018 at 6:36 PM, Himanshu Jha
> > wrote:
> >
> >>> > + /* Look up table 1 for the possible gas range va
On Sat, Jul 21, 2018 at 06:43:51PM +0300, Andy Shevchenko wrote:
> On Sat, Jul 21, 2018 at 6:36 PM, Himanshu Jha
> wrote:
>
> >> > + /* Look up table 1 for the possible gas range values */
> >> > + u32 lookupTable1[16] = {2147
On Sat, Jul 21, 2018 at 06:43:51PM +0300, Andy Shevchenko wrote:
> On Sat, Jul 21, 2018 at 6:36 PM, Himanshu Jha
> wrote:
>
> >> > + /* Look up table 1 for the possible gas range values */
> >> > + u32 lookupTable1[16] = {2147
ld not be here.
Ok.
> > + default:
> > + return -EINVAL;
> > + }
> > + default:
> > + return -EINVAL;
> > + }
> > +
>
> You can't get here so no point in having this return. I'll delete it.
OK.
&
ld not be here.
Ok.
> > + default:
> > + return -EINVAL;
> > + }
> > + default:
> > + return -EINVAL;
> > + }
> > +
>
> You can't get here so no point in having this return. I'll delete it.
OK.
&
/datasheets/BST-BME680-DS001-00.pdf
Cc: Daniel Baluta
Signed-off-by: Himanshu Jha
---
v4:
-Added Bosch API links and datasheet link.
-explained with comments about the compensate functions.
-fixed SPI ID register address.
-Used FIELD_PREP macro to avoid unnecessary hard coding
/datasheets/BST-BME680-DS001-00.pdf
Cc: Daniel Baluta
Signed-off-by: Himanshu Jha
---
v4:
-Added Bosch API links and datasheet link.
-explained with comments about the compensate functions.
-fixed SPI ID register address.
-Used FIELD_PREP macro to avoid unnecessary hard coding
Hi Jonathan,
On Sun, Jul 15, 2018 at 10:10:36AM +0100, Jonathan Cameron wrote:
> On Sat, 14 Jul 2018 13:03:42 +0530
> Himanshu Jha wrote:
>
> > Hi David,
> >
> > On Fri, Jul 13, 2018 at 01:42:35PM -0700, David Frey wrote:
> > > Hi Himanshu Jha,
> >
Hi Jonathan,
On Sun, Jul 15, 2018 at 10:10:36AM +0100, Jonathan Cameron wrote:
> On Sat, 14 Jul 2018 13:03:42 +0530
> Himanshu Jha wrote:
>
> > Hi David,
> >
> > On Fri, Jul 13, 2018 at 01:42:35PM -0700, David Frey wrote:
> > > Hi Himanshu Jha,
> >
1 - 100 of 488 matches
Mail list logo