-
Notifications
You must be signed in to change notification settings - Fork 845
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
media: i2c: Add ISX021 sensor driver #2538
base: main
Are you sure you want to change the base?
Conversation
bd58eff
to
d681bbb
Compare
V2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round from me. Note that I don't see any reason for not upstreaming this so I definitely expect this to be upstreamed :).
The media and DRM out of tree stuff we have are one of the biggest pain points I have when merging to newer kernels.
@btogorean, I merged #2543 so you can rebase this and it should start giving you valid errors in your bindings (I used it an example and I know it has problems :)) |
Add YAML documentation Signed-off-by: Bogdan Togorean <[email protected]>
d681bbb
to
a2fce59
Compare
V3:
|
Add support for the Sony ISX021 RGB camera sensor Signed-off-by: Bogdan Togorean <[email protected]>
a2fce59
to
999be49
Compare
v4:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments from me. I would say to send it upstream
sensor->supplies); | ||
if (ret) { | ||
dev_err_probe(sensor->dev, ret, "failed to get supplies\n"); | ||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can do return dev_err_probe()
|
||
/* ----------------------------------------------------------------------------- | ||
* Probe & Remove | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure these comments add much :)
|
||
reg->size = 1; | ||
ret = regmap_read(sensor->regmap, reg->reg, &aux); | ||
reg->val = aux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still want to do reg->val = aux
if, for some reason, regmap_read() fails?
|
||
fmt->format = *format; | ||
|
||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this API void... We're not returning any error
pm_runtime_put_sync(sensor->dev); | ||
sensor->streaming = false; | ||
|
||
goto unlock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is awkward... Why not have the label before the 'unlock' one?
int ret; | ||
|
||
if (sensor->trigger_mode) { | ||
ret = isx021_set_fsync_trigger_mode(sensor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignored ret
return ret; | ||
|
||
return regmap_write(sensor->regmap, 0xac49, | ||
(ISX021_SHUTTER_TIME_MAX >> 8) & 0xFF); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could have some meaning on those registers plain numbers...
{ | ||
int ret; | ||
|
||
fsleep(20000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this sleep?
|
||
ret = gpiod_direction_output(sensor->reset, 0); | ||
if (ret < 0) | ||
goto err_supply; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already output... Use gpiod_set_value_cansleep()
Driver for ISX021 MIPI RGB sensor
PR Type
PR Checklist