Circuitry for portable electronic devices is provided. The circuitry may
include wireless communications circuitry and storage and processing
circuitry. The wireless communications circuitry may include an antenna
and a radio-frequency power amplifier with an adjustable gain mode. The
radio-frequency power amplifier may amplify radio-frequency signals to a
given output power. The circuitry may include an adjustable power supply
circuit that supplies an adjustable power supply voltage to the power
amplifier circuitry. The circuitry may also include a transceiver that
produce radio-frequency signals at a specified input power to the power
amplifier circuitry. The storage and processing circuitry may be used in
storing calibration data. The calibration data may specify adjustments to
be made to the input power to the radio-frequency power amplifier, the
gain mode setting of the power amplifier, and the power supply voltage
for the power amplifier to optimize performance while minimizing power
consumption.