From: Nick Dyer <nick@shmanahar.org>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Andrew Duggan <aduggan@synaptics.com>,
Chris Healy <cphealy@gmail.com>,
Henrik Rydberg <rydberg@bitmath.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] Input: synaptics-rmi4 - add support for F34 device reflash
Date: Thu, 13 Oct 2016 21:35:20 +0100 [thread overview]
Message-ID: <20161013203520.GA6525@lava.h.shmanahar.org> (raw)
In-Reply-To: <20161013135245.GM15950@mail.corp.redhat.com>
On Thu, Oct 13, 2016 at 03:52:45PM +0200, Benjamin Tissoires wrote:
> > > You could basically export rmi_fn_reset() which would call
> > > rmi_free_function_list(), rmi_scan_pdt (if initial reset),
> > > rmi_probe_interrupts() and rmi_init_functions, and this would allow you
> > > to have all this in f34.
> >
> > I see what you mean, and I do agree that it would be neater to have all
> > of this in the f34 code.
> >
> > However, the problem is that when you call rmi_free_function_list(), the
> > f34 driver and all the context information attached to it (struct
> > rmi_function, struct f34_data, and any sysfs attributes in the f34
> > directory) gets torn down, so you're kind of left without the branch you
> > were sitting on.
> >
> > To get around that, I'd have to make f34 a special case anyway. Taking
> > that into account, the current solution seemed neater to me. I could
> > possibly cram a little more of it into rmi_f34.c, but I think the
> > context has to be "struct rmi_driver_data".
>
> If I understand correctly, rmi_firmware_update() is only called through
> the sysfs. So how about you export the required functions from core you
> are using and export 2 functions from rmi_f34 that will be a special
> case: rmi_f34_create_sysfs() and rmi_f34_remove_sysfs() (or any better
> names). You could just put your code in rmi_f34, provide noops
> declarations if RMI_F34 is not set, and core will have only 2 calls to
> rmi_f34.
OK: I will have a go at achieving this over the next few days. I also
have some changes almost ready to add F34 bootloader V7 support.
> BTW, I am thinking at carrying in my next RMI4 series your 1/2 patch. I
> also want to take Bjorn and Andrew left patches so that we have a common
> tree at some point. Any objections?
> Of course, if you resubmit before me, feel free to carry over 1/2.
Sounds like a good idea, it will reduce merging difficulty later.
N
next prev parent reply other threads:[~2016-10-13 20:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 20:42 [PATCH v3 0/2] Input: synaptics-rmi4 - F34 device reflash support Nick Dyer
2016-09-20 20:42 ` [PATCH v3 1/2] Input: synaptics-rmi4 - factor out functions from probe Nick Dyer
2016-10-10 13:04 ` Benjamin Tissoires
2016-09-20 20:42 ` [PATCH v3 2/2] Input: synaptics-rmi4 - add support for F34 device reflash Nick Dyer
2016-10-10 13:48 ` Benjamin Tissoires
2016-10-12 18:57 ` Nick Dyer
2016-10-13 13:52 ` Benjamin Tissoires
2016-10-13 20:35 ` Nick Dyer [this message]
2016-10-18 23:34 ` [PATCH v4 0/7] Nick Dyer
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=20161013203520.GA6525@lava.h.shmanahar.org \
--to=nick@shmanahar.org \
--cc=aduggan@synaptics.com \
--cc=benjamin.tissoires@redhat.com \
--cc=bjorn.andersson@linaro.org \
--cc=cphealy@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rydberg@bitmath.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;
as well as URLs for NNTP newsgroup(s).