Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432228 > unrolled thread
| Started by | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| First post | 2016-06-27 21:10 +0200 |
| Last post | 2016-06-27 23:20 +0200 |
| Articles | 7 on this page of 27 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/3] Updated spidev usability patchset Michal Suchanek <hramrach@gmail.com> - 2016-06-27 21:10 +0200
[PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-27 21:10 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-27 21:10 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-27 21:50 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-06-27 22:40 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-06-28 00:20 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-28 14:50 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-06-28 18:00 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-28 18:30 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-06-28 20:40 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-28 22:10 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-06-28 23:40 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-29 05:40 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-06-29 20:10 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-06-30 09:50 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Dan O'Donovan <dan@emutex.com> - 2016-06-30 11:10 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-07-01 11:40 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-07-01 12:30 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-07-01 10:30 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-07-01 11:00 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-07-01 17:10 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-07-01 17:40 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Mark Brown <broonie@kernel.org> - 2016-07-01 18:30 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-07-01 21:00 +0200
Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver Michal Suchanek <hramrach@gmail.com> - 2016-07-01 21:40 +0200
[PATCH v2 2/3] spi: of: allow instantiating slaves without a driver Michal Suchanek <hramrach@gmail.com> - 2016-06-27 21:10 +0200
Re: [PATCH v2 2/3] spi: of: allow instantiating slaves without a driver Mark Brown <broonie@kernel.org> - 2016-06-27 23:20 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-07-01 17:10 +0200 |
| Subject | Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver |
| Message-ID | <rQ8eS-8cq-5@gated-at.bofh.it> |
| In reply to | #1435173 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Jul 01, 2016 at 10:58:34AM +0200, Michal Suchanek wrote: > On 1 July 2016 at 10:25, Mark Brown <broonie@kernel.org> wrote: > > It's been repeatedly suggested to you that the tooling for this stuff > > could use some work. Please go and put some effort into that rather > > than continuing this thread which is accomplishing nothing. > You completely miss the point. No tooling will make people reconfigure > the kernel when the configuration in fact stays the same. > Sure the tooling does need work. And it would help getting the cases > when the tooling is NOT needed out of the way. I understand the problem perfectly, no amount of repeating yourself is going to change the problems that the bodge you are trying to force in creates for other users and the maintainability of the system.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-07-01 17:40 +0200 |
| Subject | Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver |
| Message-ID | <rQ8HU-8mD-21@gated-at.bofh.it> |
| In reply to | #1435398 |
On 1 July 2016 at 17:00, Mark Brown <broonie@kernel.org> wrote: > On Fri, Jul 01, 2016 at 10:58:34AM +0200, Michal Suchanek wrote: >> On 1 July 2016 at 10:25, Mark Brown <broonie@kernel.org> wrote: > >> > It's been repeatedly suggested to you that the tooling for this stuff >> > could use some work. Please go and put some effort into that rather >> > than continuing this thread which is accomplishing nothing. > >> You completely miss the point. No tooling will make people reconfigure >> the kernel when the configuration in fact stays the same. > >> Sure the tooling does need work. And it would help getting the cases >> when the tooling is NOT needed out of the way. > > I understand the problem perfectly, no amount of repeating yourself is > going to change the problems that the bodge you are trying to force in > creates for other users and the maintainability of the system. Can you, please, specify what problems this patch creates for other users and maintainability? Without stating the problems of this solution clearly or proposing alternate workable solution there is not much that can be done. Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-07-01 18:30 +0200 |
| Subject | Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver |
| Message-ID | <rQ9uh-r2-15@gated-at.bofh.it> |
| In reply to | #1435432 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Jul 01, 2016 at 05:37:53PM +0200, Michal Suchanek wrote: > Can you, please, specify what problems this patch creates for other users > and maintainability? To repeat yet again a major design goal for DT is to describe the hardware rather than implementation details of the software you plan to run on the system. Not doing this breaks upgrades or changes in our ideas of how we control a given bit of hardware. > Without stating the problems of this solution clearly or proposing alternate > workable solution there is not much that can be done. You are rejecting out of hand any suggestion that is not the one solution you are demanding. I'm done with this thread, please come back with new code that fits in with the device model and device tree designs.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-07-01 21:00 +0200 |
| Subject | Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver |
| Message-ID | <rQbPs-1IB-25@gated-at.bofh.it> |
| In reply to | #1435488 |
On 1 July 2016 at 18:22, Mark Brown <broonie@kernel.org> wrote: > On Fri, Jul 01, 2016 at 05:37:53PM +0200, Michal Suchanek wrote: > >> Can you, please, specify what problems this patch creates for other users >> and maintainability? > > To repeat yet again a major design goal for DT is to describe the > hardware rather than implementation details of the software you plan to > run on the system. Not doing this breaks upgrades or changes in our > ideas of how we control a given bit of hardware. > >> Without stating the problems of this solution clearly or proposing alternate >> workable solution there is not much that can be done. > > You are rejecting out of hand any suggestion that is not the one > solution you are demanding. Your only suggestion is that hardware that is not driven by kernel is described to the kernel. I have written in great detail why this does not make sense. So to me it seems that you reject out of hand any suggestion that is not the one solution you are demanding. You have not raised any concrete reason against the proposed solution other than it does not describe the hardware. The hardware cannot be described for practical usability reasons. > > I'm done with this thread, please come back with new code that fits in > with the device model and device tree designs. Is there any solution that fits the driver model and allows using spidev with arbitrary device without describing said device in devicetree? Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-07-01 21:40 +0200 |
| Subject | Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver |
| Message-ID | <rQcs9-2aJ-7@gated-at.bofh.it> |
| In reply to | #1435555 |
On 1 July 2016 at 20:56, Michal Suchanek <hramrach@gmail.com> wrote: > On 1 July 2016 at 18:22, Mark Brown <broonie@kernel.org> wrote: >> On Fri, Jul 01, 2016 at 05:37:53PM +0200, Michal Suchanek wrote: >> >>> Can you, please, specify what problems this patch creates for other users >>> and maintainability? >> >> To repeat yet again a major design goal for DT is to describe the >> hardware rather than implementation details of the software you plan to >> run on the system. Not doing this breaks upgrades or changes in our >> ideas of how we control a given bit of hardware. Oh, and can you point out where in this patchset are implementation details of the software I intend to run put in the devicetree? I don't see any such thing here. Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-06-27 21:10 +0200 |
| Subject | [PATCH v2 2/3] spi: of: allow instantiating slaves without a driver |
| Message-ID | <rOK4V-4o3-31@gated-at.bofh.it> |
| In reply to | #1432228 |
SPI slave devices are not created when looking up driver for the slave
fails. Create a device anyway so it can be manually bound to a driver.
This allows manually binding a driver to slave devices for which the
driver specified by compatible is not available of for which no driver
is specified at all. Drivers like spidev or m25p80 that require no
configuratiom can be bound to such node.
Since this allows slave DT nodes without specifying a slave driver make
speed also optional. It makes no sense to specify speed when the device
is not specified. The value is only advisory anyway and the slave
driver can try to set arbitrary transfer speed.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
---
drivers/spi/spi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 0239b45..9b3b512 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1477,9 +1477,8 @@ of_register_spi_device(struct spi_master *master, struct device_node *nc)
rc = of_modalias_node(nc, spi->modalias,
sizeof(spi->modalias));
if (rc < 0) {
- dev_err(&master->dev, "cannot find modalias for %s\n",
+ dev_warn(&master->dev, "cannot find modalias for %s\n",
nc->full_name);
- goto err_out;
}
/* Device address */
@@ -1543,11 +1542,11 @@ of_register_spi_device(struct spi_master *master, struct device_node *nc)
/* Device speed */
rc = of_property_read_u32(nc, "spi-max-frequency", &value);
if (rc) {
- dev_err(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
+ dev_warn(&master->dev, "%s has no valid 'spi-max-frequency' property (%d)\n",
nc->full_name, rc);
- goto err_out;
+ } else {
+ spi->max_speed_hz = value;
}
- spi->max_speed_hz = value;
/* Store a pointer to the node in the device structure */
of_node_get(nc);
--
2.8.1
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-06-27 23:20 +0200 |
| Subject | Re: [PATCH v2 2/3] spi: of: allow instantiating slaves without a driver |
| Message-ID | <rOM6J-5HJ-7@gated-at.bofh.it> |
| In reply to | #1432230 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Jun 27, 2016 at 09:02:31PM +0200, Michal Suchanek wrote: > SPI slave devices are not created when looking up driver for the slave > fails. Create a device anyway so it can be manually bound to a driver. That's not what of_modalias_node() does, of_modalias_node() just mangles a compatible string into a format for consumption by modutils. It makes no effort to find a driver in doing this, it just does a simple string transformation on the compatible. > This allows manually binding a driver to slave devices for which the > driver specified by compatible is not available of for which no driver > is specified at all. Drivers like spidev or m25p80 that require no > configuratiom can be bound to such node. As ever spidev should never appear directly in a DT because it is not a description of hardware, the DT should describe whatever device is there and then we need to work out in Linux how to bind spidev to it if that's what we want to do. m25p80 does represent real hardware and that hardware should be described, for example by using the jedec,spi-nor compatible which says that a non-specific JEDEC enumerable flash is present. > Since this allows slave DT nodes without specifying a slave driver make > speed also optional. It makes no sense to specify speed when the device > is not specified. The value is only advisory anyway and the slave > driver can try to set arbitrary transfer speed. This appears to be at best marginally related to the rest of the patch. That means that it should be a separate patch.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web