<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/hid/i2c-hid, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/hid/i2c-hid?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/hid/i2c-hid?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-03-23T09:04:40Z</updated>
<entry>
<title>Merge branch 'for-5.18/i2c-hid' into for-linus</title>
<updated>2022-03-23T09:04:40Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2022-03-23T09:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5d3ab41394f70a4398b586c24a2d15d7ac3cb442'/>
<id>urn:sha1:5d3ab41394f70a4398b586c24a2d15d7ac3cb442</id>
<content type='text'>
- fixes for handling unnumbered reports fully correctly (Angela Czubak
  Dmitry Torokhov)
- untangling of intermingled code for sending and handling output reports
  in __i2c_hid_command() (Dmitry Torokhov)
</content>
</entry>
<entry>
<title>HID: i2c-hid: remove unneeded semicolon</title>
<updated>2022-02-16T15:30:00Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2022-02-16T01:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=269ecc0c894c6db7ea13ae076c01bd24e87b15e6'/>
<id>urn:sha1:269ecc0c894c6db7ea13ae076c01bd24e87b15e6</id>
<content type='text'>
Eliminate the following coccicheck warning:
./drivers/hid/i2c-hid/i2c-hid-core.c:357:56-57: Unneeded semicolon

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: note that I2C xfer buffers are DMA-safe</title>
<updated>2022-02-14T09:52:29Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1c4d6cd4cb48ae5d097c610a5ca4bd15e9f41bfb'/>
<id>urn:sha1:1c4d6cd4cb48ae5d097c610a5ca4bd15e9f41bfb</id>
<content type='text'>
All I2C communications in the driver use driver-private buffers that are
DMA-safe, so mark them as such.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: no longer need raw access to HID descriptor structure</title>
<updated>2022-02-14T09:52:29Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=551117c52237e7d92bc050df961b6a63e86c5bcd'/>
<id>urn:sha1:551117c52237e7d92bc050df961b6a63e86c5bcd</id>
<content type='text'>
We can stop defining a union for HID descriptor data as we now only access
individual members of it by names and using proper types instead of
accessing by offset from the beginning of the data structure.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: use helpers to do endian conversion in i2c_hid_get_input()</title>
<updated>2022-02-14T09:52:29Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=86fc3fd28157b6d4d044bdc00b3ee72899e554fc'/>
<id>urn:sha1:86fc3fd28157b6d4d044bdc00b3ee72899e554fc</id>
<content type='text'>
It is better to use helpers to do endian conversion as it documents
and draws attention to it, and might be a bit more performant as
well.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: rework i2c_hid_get_report() to use i2c_hid_xfer()</title>
<updated>2022-02-14T09:51:08Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=85df713377ddc0482071c3e6b64c37bd1e48f1f1'/>
<id>urn:sha1:85df713377ddc0482071c3e6b64c37bd1e48f1f1</id>
<content type='text'>
Explicitly prepare command for i2c_hid_get_report() which makes the logic
clearer and allows us to get rid of __i2c_hid_command() and related command
definitions.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: convert i2c_hid_execute_reset() to use i2c_hid_xfer()</title>
<updated>2022-02-14T09:51:08Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=50c5249fcafc9f9c64e4a367e336c2e17f1c978f'/>
<id>urn:sha1:50c5249fcafc9f9c64e4a367e336c2e17f1c978f</id>
<content type='text'>
This will allow us to drop i2c_hid_command() wrapper and get close
to removing __i2c_hid_command().

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: create a helper for SET_POWER command</title>
<updated>2022-02-14T09:51:08Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=acb8dd95974dda4b6072410bfe09bc83d2c22d23'/>
<id>urn:sha1:acb8dd95974dda4b6072410bfe09bc83d2c22d23</id>
<content type='text'>
Another case where creating a dedicated helper allows for cleaner code that
shows exactly what communication happens with the device when toggling its
power.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: define i2c_hid_read_register() and use it</title>
<updated>2022-02-14T09:51:07Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8399bd01026eab803d6ebb5372cf28b5e1f335f8'/>
<id>urn:sha1:8399bd01026eab803d6ebb5372cf28b5e1f335f8</id>
<content type='text'>
Handling simple read of device registers in __i2c_hid_command() makes it
too complicated and the need of special handling for the HID descriptor
register adds even more complexity. Instead, let's create simple
i2c_hid_read_register() helper on base of i2c_hid_xfer() and use it.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: i2c-hid: explicitly code setting and sending reports</title>
<updated>2022-02-14T09:51:07Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-01-18T07:26:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dbe0dd5fd2e0c687ad50fc590d5a90400f26adcc'/>
<id>urn:sha1:dbe0dd5fd2e0c687ad50fc590d5a90400f26adcc</id>
<content type='text'>
Instead of relying on __i2c_hid_command() that tries to handle all
commands and because of that is very complicated, let's define a
new dumb helper i2c_hid_xfer() that actually transfers (write and
read) data, and use it when sending and setting reports. By doing
that we can save on number of copy operations we have to execute,
and make logic of sending reports much clearer.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
