Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/exp/io/spi/driver: Opener should not require bus and cs number #15774

Closed
rakyll opened this issue May 20, 2016 · 3 comments
Closed

x/exp/io/spi/driver: Opener should not require bus and cs number #15774

rakyll opened this issue May 20, 2016 · 3 comments

Comments

@rakyll
Copy link
Contributor

rakyll commented May 20, 2016

There are proprietary SPI and I2C implementations out there doesn't work with a bus and chip select number. We shouldn't force this in the driver interface.

I suggest Opener not to accept any arguments:

type Opener interface {
    Open() (Conn, error)
}

The Devfs might require a bus and chip select number or the device filename.

type Devfs struct {
    Bus, CS int
}
@rakyll rakyll added this to the Unreleased milestone May 20, 2016
@rakyll rakyll self-assigned this May 20, 2016
@rakyll
Copy link
Contributor Author

rakyll commented May 20, 2016

Note: The problem and the suggested solution also applies to the i2c package.

@rakyll rakyll changed the title x/exp/io/spi: Opener should not require bus and cs number x/exp/io/spi/driver: Opener should not require bus and cs number May 20, 2016
@gopherbot
Copy link

CL https://golang.org/cl/23288 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/23289 mentions this issue.

gopherbot pushed a commit to golang/exp that referenced this issue May 21, 2016
Updates golang/go#15774.

Change-Id: Ieac185e6f409fd93a807fb5c3a0a0629f0a7c29b
Reviewed-on: https://go-review.googlesource.com/23288
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Jaana Burcu Dogan <jbd@google.com>
gopherbot pushed a commit to golang/exp that referenced this issue May 21, 2016
Updates golang/go#15774.

Change-Id: I85e340635a74f265902aab5ff1e593b75085fe7a
Reviewed-on: https://go-review.googlesource.com/23289
Reviewed-by: Johan Euphrosine <proppy@google.com>
Reviewed-by: Minux Ma <minux@golang.org>
@rakyll rakyll closed this as completed May 22, 2016
@golang golang locked and limited conversation to collaborators May 22, 2017
@rsc rsc unassigned rakyll Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants