Skip to content

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Feb 28, 2018

Contribution description

This PR update the params definitions scheme for the tcs37727 device driver.

Issues/PRs references

Initially done in #7937 and related to #7519

#6577

@aabadie aabadie added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 28, 2018
miri64
miri64 previously requested changes Mar 7, 2018
/**
* @brief Export the sensor's SAUL interface
*/
extern const saul_driver_t tcs37727_saul_driver;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, now that I see this option, I think I prefer the extern definition to be in the drivers header. This way one just needs to include the header to get access to the driver, which seems to be for me the more natural way for a C-programmer to get access to global definitions. Also, a user not using auto_init would have to know what to get from extern. The (public) documentation for that is also removed here. Or is there anything speaking against this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but SAUL is a higher layer API, and should not be dependency of the lower layer driver. That said, one should also remove the #include "saul.h" above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That said, one should also remove the #include "saul.h" above.

Indeed, will do

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but SAUL is a higher layer API, and should not be dependency of the lower layer driver. That said, one should also remove the #include "saul.h" above.

You are right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe have some <driver_name>_saul.h or <driver_name>/saul.h instead than?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inclusion of saul.h removed.

/**
* @brief Export the sensor's SAUL interface
*/
extern const saul_driver_t tcs37727_saul_driver;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but SAUL is a higher layer API, and should not be dependency of the lower layer driver. That said, one should also remove the #include "saul.h" above.

@smlng
Copy link
Member

smlng commented Mar 8, 2018

tested with pba-d-01-kw2x -> works

@aabadie aabadie force-pushed the pr/drivers/params/tcs37727 branch from 26c0e4f to 469dc53 Compare March 8, 2018 14:47
@aabadie
Copy link
Contributor Author

aabadie commented Mar 21, 2018

@miri64, your comments are addressed here.

@aabadie aabadie changed the base branch from master to new_i2c_if May 27, 2018 21:14
@aabadie aabadie force-pushed the pr/drivers/params/tcs37727 branch from 469dc53 to 28dac25 Compare May 27, 2018 21:16
@aabadie aabadie added TF: I2C Marks issues and PRs related to the work of the I²C rework task force and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 27, 2018
@aabadie aabadie force-pushed the pr/drivers/params/tcs37727 branch from 28dac25 to ba7c40a Compare June 7, 2018 21:50
@aabadie aabadie force-pushed the pr/drivers/params/tcs37727 branch from ba7c40a to 739aeac Compare June 18, 2018 11:34
@smlng
Copy link
Member

smlng commented Jun 27, 2018

@miri64 can you've another look (or dismiss your review), thx! we should get I2C rework through to avoid blocking I2C changes/addition in master for too long.

@smlng
Copy link
Member

smlng commented Jul 4, 2018

ping @miri64 we want to get the I2C rework done -- if possible for the upcoming release, please check your review, THX!

@miri64 miri64 dismissed their stale review July 4, 2018 08:30

Sorry, lost track on this one. Dismissed my review.

@miri64
Copy link
Member

miri64 commented Jul 4, 2018

On a separate note: does it make sense to push this effort for the upcoming release? Wouldn't it be safer to merge the I²C rework after the release so it can mature until the next release?

@smlng
Copy link
Member

smlng commented Jul 4, 2018

re-tested ACK

@smlng smlng merged commit 76e11ee into RIOT-OS:new_i2c_if Jul 4, 2018
@aabadie
Copy link
Contributor Author

aabadie commented Jul 4, 2018

does it make sense to push this effort for the upcoming release?

I'm not sure that's the best moment for this kind of question but ok.

For various reasons, the sooner, the better I think: a lot of effort, from a lot of people has already been put in this work, the I2C embargo is annoying because it blocks other contributions, there's a good momentum around this topic in the community and this I2C rework initiative was launched even before the previous release (the initial work started more than one year ago).

@smlng
Copy link
Member

smlng commented Jul 4, 2018

let's see how much we can achieve within the next few days, we are on a good track - but in the end its up to the release manager @cladmi to decide what's in and out. However, keep pushing to drop the embargo sooner than later.

@miri64
Copy link
Member

miri64 commented Jul 4, 2018

I'm not sure that's the best moment for this kind of question but ok.

I think it's the perfect moment to ask this question. Lot's of people under pressure and wanting to finish there work ASAP (which is for very the reasons @aabadie gave very understandable). But exactly because of that it is sometimes helpful to step back (or a third party to step in) and ask: is this still the right thing to do now. I'm just worried that we push it too quickly just because we want to get done on the risk of potentially breaking the a huge chunk of the next release. Don't get me wrong, I'd like to have the embargo dropped also sooner rather than later, but not on the condition of having a broken release.

@aabadie
Copy link
Contributor Author

aabadie commented Jul 4, 2018

I think it's the perfect moment to ask this question

Do you really think the perfect moment exists ? I don't.
A better moment to ask this question would be IMHO just after a release. It gave us enough time for people to discuss and organize themselves and do the work. This is what was done after 2018.04.
Now we are finalizing the work: all but one CPU families were adapted, all device drivers are adapted, automatic testing is also on its way.

I'm just worried that we push it too quickly just because we want to get done on the risk of potentially breaking the a huge chunk of the next release

Any valuable active help is always welcome to avoid this, volunteer ?

@miri64
Copy link
Member

miri64 commented Jul 4, 2018

Any valuable active help is always welcome to avoid this, volunteer ?

Apart from testing on the little bit of hardware I have, I think there isn't much I can contribute with regarding that kind of help. But if you have questions regarding process or Git I am happy to help :-)

basilfx pushed a commit to basilfx/RIOT that referenced this pull request Jul 10, 2018
 drivers/tcs37727: apply unified params definition scheme
dylad pushed a commit to dylad/RIOT that referenced this pull request Jul 10, 2018
 drivers/tcs37727: apply unified params definition scheme
dylad pushed a commit that referenced this pull request Jul 11, 2018
 drivers/tcs37727: apply unified params definition scheme
@aabadie aabadie deleted the pr/drivers/params/tcs37727 branch September 23, 2018 08:47
@aabadie aabadie added this to the Release 2018.10 milestone Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers TF: I2C Marks issues and PRs related to the work of the I²C rework task force Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants