From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Fabio Baltieri <fabiobaltieri@chromium.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Jiri Kosina <jikos@kernel.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] HID: hid-google-stadiaff: add support for Stadia force feedback
Date: Fri, 14 Jul 2023 14:13:34 -0700 [thread overview]
Message-ID: <878rbidwn5.fsf@nvidia.com> (raw)
In-Reply-To: <20230709214410.3676224-1-fabiobaltieri@chromium.org> (Fabio Baltieri's message of "Sun, 9 Jul 2023 21:44:10 +0000")
On Sun, 09 Jul, 2023 21:44:10 +0000 Fabio Baltieri <fabiobaltieri@chromium.org> wrote:
> Add a hid-stadiaff module to support rumble based force feedback on the
> Google Stadia controller. This works using the HID output endpoint
> exposed on both the USB and BLE interface.
>
> Signed-off-by: Fabio Baltieri <fabiobaltieri@chromium.org>
> ---
> +static int stadia_probe(struct hid_device *hdev, const struct hid_device_id *id)
> +{
> + int ret;
> +
> + ret = hid_parse(hdev);
> + if (ret) {
> + hid_err(hdev, "parse failed\n");
> + return ret;
> + }
> +
> + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
> + if (ret) {
> + hid_err(hdev, "hw start failed\n");
> + return ret;
> + }
> +
> + ret = stadiaff_init(hdev);
> + if (ret) {
> + dev_err(&hdev->dev, "force feedback init failed\n");
Error handling looks good to me now. Is there any particular reason you
use dev_err here instead of hid_err here?
-- Rahul Rameshbabu
next prev parent reply other threads:[~2023-07-14 21:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-09 21:44 [PATCH v3] HID: hid-google-stadiaff: add support for Stadia force feedback Fabio Baltieri
2023-07-14 21:13 ` Rahul Rameshbabu [this message]
2023-07-16 18:39 ` Fabio Baltieri
2023-07-16 18:47 ` Rahul Rameshbabu
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=878rbidwn5.fsf@nvidia.com \
--to=rrameshbabu@nvidia.com \
--cc=benjamin.tissoires@redhat.com \
--cc=fabiobaltieri@chromium.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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