mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Antonio Borneo <borneo.antonio@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Ellen Wang <ellen@cumulusnetworks.com>,
	David Barksdale <dbarksdale@uplogix.com>,
	linux-input <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC] HID: cp2112: add IRQ chip handling
Date: Mon, 28 Nov 2016 14:45:54 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.1611281445290.29400@cbobk.fhfr.pm> (raw)
In-Reply-To: <CAAj6DX28iTuSxs5igUXJc3SoXPmdPwpf_ZQ98vaqfpKSum6G0A@mail.gmail.com>

On Sat, 26 Nov 2016, Antonio Borneo wrote:

> > I am currently running this patch in my local tree.
> > It allows to attach a SMBus device completely on the CP2112, with a simple
> > definition at the end of probe:
> >
> >         {
> >                 struct i2c_client *client;
> >                 struct i2c_hid_platform_data pdata = {
> >                         .hid_descriptor_address = 0x20,
> >                 };
> >                 struct i2c_board_info synaptics_info = {
> >                         I2C_BOARD_INFO("hid", 0x2c),
> >                         .platform_data = &pdata,
> >                 };
> >                 int irq = cp2112_allocate_irq(dev, 2);
> >
> >                 if (irq <= 0) {
> >                         dev_err(dev->gc.parent, "Failed to translate GPIO to IRQ\n");
> >                         goto err_sysfs_remove;
> >                 }
> >
> >                 synaptics_info.irq = irq;
> >                 irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
> >
> >                 hid_device_io_start(hdev);
> >
> >                 /* give time for the device to initialize */
> >                 msleep(500);
> >
> >                 client = i2c_new_device(&dev->adap, &synaptics_info);
> >                 if (!client)
> >                         hid_err(hdev, "failed allocating Synaptics device\n");
> >
> >         }
> >
> > I wonder if we want to consider this upstream, given that the driver is only
> > used for development.
> 
> Ciao Benjamin,
> 
> for me it makes sense to push it upstream.
> I also coded something similar 2+ years ago, but then my cp2112 got
> broken before I could clean-up and submit the patches.
> As far as I remember, Ellen was using cp2112 in a system in production.
> For sure this driver is not widely used, but definitively it's not for
> development use only.

I've queued this in for-4.10/cp2112. Thanks,

-- 
Jiri Kosina
SUSE Labs

      reply	other threads:[~2016-11-28 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 11:07 Benjamin Tissoires
2016-11-26 21:57 ` Antonio Borneo
2016-11-28 13:45   ` Jiri Kosina [this message]

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=alpine.LNX.2.00.1611281445290.29400@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=borneo.antonio@gmail.com \
    --cc=dbarksdale@uplogix.com \
    --cc=ellen@cumulusnetworks.com \
    --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

all inboxes | Powered by JetHome®