linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Neumann <mail@richard-neumann.de>
To: "Shah, Nehal-bakulchandra" <nehal-bakulchandra.shah@amd.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Sandeep Singh <Sandeep.Singh@amd.com>,
	Shyam-sundar.S-k@amd.com, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-input <linux-input@vger.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH v4 2/4] SFH: PCI driver to add support of AMD sensor fusion Hub using HID framework
Date: Tue, 21 Apr 2020 23:18:23 +0200	[thread overview]
Message-ID: <c6831429000eeb2132c68c44d4d171063fa53d56.camel@richard-neumann.de> (raw)
In-Reply-To: <f4c08c96-bbaf-c42e-0dff-a02c5bbed6ed@amd.com>

[-- Attachment #1: Type: text/plain, Size: 2798 bytes --]

Am Mittwoch, den 22.04.2020, 00:01 +0530 schrieb Shah, Nehal-
bakulchandra:
> Hi Richard,
> 
> Thanks for the refactoring  the patch. The .raw_request in
> hid_ll_driver is not correct, the output of sensor is not raw but it
> is processed one,
> 
> so better to move it to .request function. Regarding your question
> for sensor position well it comes from firmware. So i am not sure
> about the firmware
> 
> for sensor , what you have.Also, regarding the IOMMU, we figured out
> the issue, earlier patch series has bug that during DMA allocation
> pdev was passed
> 
> from platform driver context, where in for IOMMU needs context PCI
> pdev. So that is taken care in your refactored patch hence issue is
> disappeared.
> 
> 
> Now regarding the patch (with your changes) i need to validate at our
> side. Due to lockdown i dont have access to the system, so may be we
> can wait on that.
> 
> 
> Thanks
> 
> Nehal Shah

Hi Nehal

and thank you for the feedback.

Regarding the raw_request / request, I think the "raw" here is meant to
indicate, that the implementation is expected to write "raw bytes" [1]
into a buffer rather than handling a "struct hid_report", which is
exactly what the get_feature_report() and get_input_report() from the
original patch seem to be intended to do.
However it should be easy to migrate this to ".report", since it'd
probably look a lot like __hid_request() [2], which is currently doing
the magic automatically for me.
Furthermore a ll_driver needs a raw_request implementation anyways as
it's being tested for in hid_add_device() [3].

Regarding the validation on your side: Of course! I do in no way want
to undermine your work on this in any way. I'm just offering what I've
learned so far and what is working for me. If you find parts of it
worth taking into a refactored version for upstream, awesome. If you
don't agree with other parts, that's fine, too. I'm quite new to this
and eager to learn. Also I am in no rush. Good things take time.

In case you're missing my patch on gist.github.com, I decided to
further develop the driver in a forked linux source tree [4].

It's on the branch amd-sfh. You can just diff to the master branch to
get the entire patch. The changed files are still under
drivers/hid/amd-sfh-hid and Documentation/hid respectively.

You'll find that in the meantime I did some more work / learning and
implemented some rudimentary IRQ handling.

Kind regards,

Richard

[1] https://elixir.bootlin.com/linux/latest/source/include/linux/hid.h#L1070
[2] https://elixir.bootlin.com/linux/latest/source/drivers/hid/hid-core.c#L1688
[3] https://elixir.bootlin.com/linux/latest/source/drivers/hid/hid-core.c#L2386
[3] https://github.com/conqp/linux/tree/amd-sfh

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2020-04-21 21:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27  4:58 [PATCH v4 0/4] SFH: Add Support for AMD Sensor Fusion Hub Sandeep Singh
2020-02-27  4:58 ` [PATCH v4 1/4] SFH: Add maintainers and documentation for AMD SFH based on HID framework Sandeep Singh
2020-02-27  4:58 ` [PATCH v4 2/4] SFH: PCI driver to add support of AMD sensor fusion Hub using " Sandeep Singh
2020-03-09  5:13   ` Singh, Sandeep
2020-03-27 14:55   ` Andy Shevchenko
2020-03-30  5:12     ` Singh, Sandeep
2020-03-30  8:33   ` Richard Neumann
2020-03-31 12:31   ` Richard Neumann
2020-03-31 13:18     ` Shah, Nehal-bakulchandra
2020-03-31 17:24       ` Andy Shevchenko
2020-04-01 16:28         ` Richard Neumann
2020-04-06  5:26           ` Shah, Nehal-bakulchandra
2020-04-13 13:33             ` Richard Neumann
2020-04-21 18:31               ` Shah, Nehal-bakulchandra
2020-04-21 21:18                 ` Richard Neumann [this message]
2020-02-27  4:58 ` [PATCH v4 3/4] SFH: Transport Driver to add support of AMD Sensor Fusion Hub (SFH) Sandeep Singh
2020-02-27  4:58 ` [PATCH v4 4/4] SFH: Create HID report to Enable support of AMD sensor fusion " Sandeep Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6831429000eeb2132c68c44d4d171063fa53d56.camel@richard-neumann.de \
    --to=mail@richard-neumann.de \
    --cc=Sandeep.Singh@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=jic23@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nehal-bakulchandra.shah@amd.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).