-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
drivers: dac: ad3530r: Add driver support for Ad3530R #2403
base: main
Are you sure you want to change the base?
Conversation
Add header and source files for AD3530R driver. Signed-off-by: SGudla <Saikiran.Gudla@analog.com>
9897b2e
to
3008d06
Compare
@@ -0,0 +1,1093 @@ | |||
/**************************************************************************//** |
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.
Use the BSD 3 clause license instead (e.g https://github.com/analogdevicesinc/no-OS/blob/main/include/no_os_aout.h#L1).
/******************************************************************************/ | ||
/************************ Functions Definitions *******************************/ | ||
/******************************************************************************/ | ||
/******************************************************************************/ |
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 remove these comments. They don't add too much and just take screen space.
.single_instr = 0, // Sets the streaming mode. | ||
.stream_length_keep_value = 1 // Prevents the stream length value from | ||
// automatically resetting to zero. | ||
}; |
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.
Use the /**/
comment style
#define AD3530R_DATA_INDEX(x) x ? 1 : 2 | ||
#define AD3530R_INSTR_LEN(x) AD3530R_DATA_INDEX(x) | ||
#define AD3530R_ADDR_INDEX(x) x ? 0 : 1 | ||
#define AD3530R_BUFF_LEN(x) x ? 2 : 3 | ||
#define AD3530R_CRC_BUFF_LEN(x) x ? 3 : 4 | ||
#define AD3530R_CRC_INDEX(x) AD3530R_ADDR_INDEX(x) + 2 |
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.
Add parentheses around x
AD3530R_REG_ADDR_INTERFACE_CONFIG_A, | ||
AD3530R_MASK_ADDR_ASCENSION, | ||
cfg->addr_asc); | ||
if (NO_OS_IS_ERR_VALUE(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.
We don't really use NO_OS_IS_ERR_VALUE()
for these cases anymore. If your functions only return negative error codes, use this instead:
if (ret)
return ret;
Add header and source files for AD3530R driver.
Pull Request Description
Please replace this with a detailed description and motivation of the changes.
You can tick the checkboxes below with an 'x' between square brackets or just check them after publishing the PR.
If this PR contains a breaking change, list dependent PRs and try to push all related PRs at the same time.
PR Type
PR Checklist