-
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: frequency: add support for ADMFM2000 #2416
base: main
Are you sure you want to change the base?
Conversation
95003f6
to
517f9d5
Compare
v2:
|
The ADMFM2000 is a dual-channel microwave downconverter, with input RF and local oscillator (LO) frequency ranges covering 5 GHz to 32 GHz, with an output intermediate frequency (IF) frequency range from 0.5 GHz to 8 GHz. Added driver and iio_support. Signed-off-by: Ramona Alexandra Nechita <ramona.nechita@analog.com>
517f9d5
to
d350712
Compare
v3:
|
There seems to be an error regarding the documentation:
|
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.
please split the code in multiple commits: one for driver, one for iio driver, one for documentation. there are multiple recent examples for this.
*/ | ||
int32_t admfm2000_set_channel_mode(struct admfm2000_dev *dev, uint8_t config); | ||
|
||
#endif /* SRC_ADMFM2000_H_ */ |
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.
nit: new line
|
||
/** | ||
* @brief Initialize the admfm2000 device. | ||
* @param device - The device structure. |
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.
all these header comments should go in the .c file as you did in the iio_admfm200.c
* @brief Header file for admfm2000 Driver. | ||
* @author Ramona Nechita (ramona.nechita@analog.com) | ||
******************************************************************************** | ||
* Copyright 2024(c) Analog Devices, Inc. |
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.
2025
* @brief Implementation of admfm2000 Driver. | ||
* @author Ramona Nechita (ramona.nechita@analog.com) | ||
******************************************************************************** | ||
* Copyright 2024(c) Analog Devices, Inc. |
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.
2025
* @brief Implementation of admfm2000 IIO Driver. | ||
* @author Ramona Nechita (ramona.nechita@analog.com) | ||
******************************************************************************** | ||
* Copyright 2024(c) Analog Devices, Inc. |
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.
2025
* @brief Header file for admfm2000 IIO Driver. | ||
* @author Ramona Nechita (ramona.nechita@analog.com) | ||
******************************************************************************** | ||
* Copyright 2024(c) Analog Devices, Inc. |
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.
2025
#define ADMFM2000_MIN_GAIN_RAW 0 | ||
#define ADMFM2000_DEFAULT_GAIN -0x20 | ||
#define ADMFM2000_NUM_CHANNELS 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.
drop extra line.
#include "no_os_print_log.h" | ||
|
||
|
||
int32_t admfm2000_get_gain(struct admfm2000_dev *dev, uint8_t chan, |
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.
all these functions should return int
|
||
|
||
int32_t admfm2000_get_gain(struct admfm2000_dev *dev, uint8_t chan, | ||
int32_t *gain) |
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.
what do you store in the gain
variable? doesn't seem to be a gain, rather a raw value after reading gpios.
The ADMFM2000 is a dual-channel microwave downconverter, with input RF and local oscillator (LO) frequency ranges covering 5 GHz to 32 GHz, with an output intermediate frequency (IF) frequency range from 0.5 GHz to 8 GHz. Added driver and iio_support.
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