Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 2021 11:46:51 +0100
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        =?ISO-8859-1?Q?S=F8ren?= Schmidt <soren.schmidt@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: PinebookPro misc drivers..
Message-ID:  <20210321114651.cafd10f9bf5c8a4341cd5b67@bidouilliste.com>
In-Reply-To: <20210321111957.e7ebc1261e3b7ec03c8718d6@bidouilliste.com>
References:  <BEA0D66A-7F35-4488-BFDD-E6947A530F18@gmail.com> <20210310160114.dd9853a0689d257388a745b5@bidouilliste.com> <88144856-F28B-4137-B0A9-4B4C8523774C@gmail.com> <20210321111957.e7ebc1261e3b7ec03c8718d6@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 21 Mar 2021 11:19:57 +0100
Emmanuel Vadot <manu@bidouilliste.com> wrote:

> On Sun, 21 Mar 2021 11:02:28 +0100
> S=F8ren Schmidt <soren.schmidt@gmail.com> wrote:
>=20
> > On 10 Mar 2021, at 16.01, Emmanuel Vadot <manu@bidouilliste.com> wrote:
> > >=20
> > > On Wed, 10 Mar 2021 15:29:21 +0100
> > > S=F8ren Schmidt <soren.schmidt@gmail.com> wrote:
> > >=20
> > >> Hi
> > >>=20
> > >> I?ve uploaded the latest from my PinebookPro collection here:
> > >> https://people.freebsd.org/~sos/PinebookPro/ <https://people.freebsd=
.org/~sos/PinebookPro/>
> > >>=20
> > >> Comment,, bugs, etc welcome?
> > >=20
> > > Few comments,
> > >=20
> > > - Could you at least share patches generated with git diff ?
> >=20
> > No git here, but added patches to the one file (rk_gpio.c) that isn?t n=
ew :)
>=20
>  Why was all the softc variable renamed, this makes reviewing much
> harder than it should be.
>=20
> > > - rk_gpiokeys.c doesn't seems correct, we already have
> > > sys/dev/gpio/gpiokeys.c so patch this one if it isn't enough for lid
> > > switch need.
> >=20
> > Well, the stock drivers handling of this is, well, less than optimal an=
d the lid support is pretty unique to the pbp so I decided to go this way a=
s to not ?pollute? the original.
>=20
>  Less than optimal why ?
>  Pretty unique why ?
>  I don't see anything unique for the pbp in the dts and if the driver
> that we already have is missing some stuff it should be patched.

 So, since I'm a nice guy I've looked at the driver.
 It is unique because you made it unique.
 Upon lid switch even if the lid closed you deactivate the lcd power
gpio control pin (which is not referenced in the dts node for the lid
switch) using a really a gross hack. We should never do that.
 You've also written that you haven't been able to get interrupts when
you open the lid but since you only configure it with
GPIO_INTR_EDGE_FALLING that's normal. What is happening if you
configure it with GPIO_INTR_EDGE_BOTH ? If it's still not working it
probably shows a problem in your gpio patch that add interrupts support.

> > > I could comment more if I would be able to diff more easily.
> >=20
> > As stated above there is now a patch for you for rk_gpio.c the rest has=
 nothing to diff against.
> >=20
> > BTW I added support for writing an updated u-boot-2021.01 to the SPI fl=
ash on the pbp (also works for rockpro64), so one can boot from eMMC, SDcar=
d, USB and NVMe with kbd/mouse support and screen output from the first u-b=
oot output.
>=20
>  And again no patches make this really hard to review.
>  Please create a phabricator account and post patches there, we can
> then have a proper discussion.
>=20
> > BTW2: the pinebookpro dock from pine64 seems to have an issue, if you t=
urn the USB-C connector ?wrong? you will lose alt the USB3 device in it. Si=
mply turn the plug 180 degrees and everything works.
> >=20
> >=20
> > --
> > S=F8ren Schmidt
> > sos@deepcore.dk / sos@freebsd.org
> > "So much code to hack, so little time"
> >=20
> >=20
> >=20
>=20
>=20
> --=20
> Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"


--=20
Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210321114651.cafd10f9bf5c8a4341cd5b67>